summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-25 12:16:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-25 12:16:10 +0000
commit92ef098c00eebe545b674ff7e8e91ab8a4957a2b (patch)
tree4b0bbbf30f0fabeb34be243b18912ae06e7a2e26
parenta8dca8ceda01218f30c08b16d2b5d77d72e9a3c5 (diff)
parentb45efb6e0f45189fc33e52e88595514636dc440c (diff)
Merge "Improve documentation for setting virtual input event time" into main
-rw-r--r--core/java/android/hardware/input/VirtualKeyEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualMouseButtonEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualMouseRelativeEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualMouseScrollEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualStylusButtonEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualStylusMotionEvent.java4
-rw-r--r--core/java/android/hardware/input/VirtualTouchEvent.java4
8 files changed, 32 insertions, 0 deletions
diff --git a/core/java/android/hardware/input/VirtualKeyEvent.java b/core/java/android/hardware/input/VirtualKeyEvent.java
index c0102bfa4072..da959af20f23 100644
--- a/core/java/android/hardware/input/VirtualKeyEvent.java
+++ b/core/java/android/hardware/input/VirtualKeyEvent.java
@@ -286,6 +286,10 @@ public final class VirtualKeyEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualKeyEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualMouseButtonEvent.java b/core/java/android/hardware/input/VirtualMouseButtonEvent.java
index fc42b1581091..333c3c78f048 100644
--- a/core/java/android/hardware/input/VirtualMouseButtonEvent.java
+++ b/core/java/android/hardware/input/VirtualMouseButtonEvent.java
@@ -197,6 +197,10 @@ public final class VirtualMouseButtonEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualMouseButtonEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualMouseRelativeEvent.java b/core/java/android/hardware/input/VirtualMouseRelativeEvent.java
index 2a42cfc57c77..86d759d025ed 100644
--- a/core/java/android/hardware/input/VirtualMouseRelativeEvent.java
+++ b/core/java/android/hardware/input/VirtualMouseRelativeEvent.java
@@ -135,6 +135,10 @@ public final class VirtualMouseRelativeEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualMouseRelativeEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualMouseScrollEvent.java b/core/java/android/hardware/input/VirtualMouseScrollEvent.java
index c89c188a443d..a4958c7198c8 100644
--- a/core/java/android/hardware/input/VirtualMouseScrollEvent.java
+++ b/core/java/android/hardware/input/VirtualMouseScrollEvent.java
@@ -146,6 +146,10 @@ public final class VirtualMouseScrollEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualMouseScrollEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java b/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
index 8c98abd6dbfe..033b1c1ee930 100644
--- a/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
+++ b/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
@@ -129,6 +129,10 @@ public final class VirtualRotaryEncoderScrollEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualRotaryEncoderScrollEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualStylusButtonEvent.java b/core/java/android/hardware/input/VirtualStylusButtonEvent.java
index 97a4cd0f692b..8fcf561bedcd 100644
--- a/core/java/android/hardware/input/VirtualStylusButtonEvent.java
+++ b/core/java/android/hardware/input/VirtualStylusButtonEvent.java
@@ -187,6 +187,10 @@ public final class VirtualStylusButtonEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualStylusButtonEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualStylusMotionEvent.java b/core/java/android/hardware/input/VirtualStylusMotionEvent.java
index 2ab76aee74a4..0ac6f3aa3e15 100644
--- a/core/java/android/hardware/input/VirtualStylusMotionEvent.java
+++ b/core/java/android/hardware/input/VirtualStylusMotionEvent.java
@@ -377,6 +377,10 @@ public final class VirtualStylusMotionEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualStylusMotionEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()
diff --git a/core/java/android/hardware/input/VirtualTouchEvent.java b/core/java/android/hardware/input/VirtualTouchEvent.java
index 7936dfef7748..0cccd257b17e 100644
--- a/core/java/android/hardware/input/VirtualTouchEvent.java
+++ b/core/java/android/hardware/input/VirtualTouchEvent.java
@@ -354,6 +354,10 @@ public final class VirtualTouchEvent implements Parcelable {
* obtained from {@link SystemClock#uptimeMillis()} (with nanosecond precision instead of
* millisecond), but can be different depending on the use case.
* This field is optional and can be omitted.
+ * <p>
+ * If this field is unset, then the time at which this event is sent to the framework would
+ * be considered as the event time (even though
+ * {@link VirtualTouchEvent#getEventTimeNanos()}) would return {@code 0L}).
*
* @return this builder, to allow for chaining of calls
* @see InputEvent#getEventTime()