summaryrefslogtreecommitdiff
path: root/core/java/android/view/KeyEvent.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-20 19:54:22 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-20 20:11:19 -0700
commitb11499d2db0ba9782363ec6bf714b583e8585212 (patch)
treefd096132eaeae5133fbfd61c42810ca6a8da5987 /core/java/android/view/KeyEvent.java
parent5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a (diff)
Make InputEvent.getEventTime() public.
Also add new methods to access the event timestamp in nanoseconds. Hidden for now but useful for prototyping. Bug: 6374616 Change-Id: I7030734a908e8e31a17a356debc269db7c0f0783
Diffstat (limited to 'core/java/android/view/KeyEvent.java')
-rwxr-xr-xcore/java/android/view/KeyEvent.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index e4a4a7569dc8..ace7aa8b4d76 100755
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -2375,17 +2375,31 @@ public class KeyEvent extends InputEvent implements Parcelable {
}
/**
- * Retrieve the time this event occurred,
+ * Retrieve the time this event occurred,
* in the {@link android.os.SystemClock#uptimeMillis} time base.
- *
+ *
* @return Returns the time this event occurred,
* in the {@link android.os.SystemClock#uptimeMillis} time base.
*/
+ @Override
public final long getEventTime() {
return mEventTime;
}
- /** @hide */
+ /**
+ * Retrieve the time this event occurred,
+ * in the {@link android.os.SystemClock#uptimeMillis} time base but with
+ * nanosecond (instead of millisecond) precision.
+ * <p>
+ * The value is in nanosecond precision but it may not have nanosecond accuracy.
+ * </p>
+ *
+ * @return Returns the time this event occurred,
+ * in the {@link android.os.SystemClock#uptimeMillis} time base but with
+ * nanosecond (instead of millisecond) precision.
+ *
+ * @hide
+ */
@Override
public final long getEventTimeNano() {
return mEventTime * 1000000L;