summaryrefslogtreecommitdiff
path: root/core/java/android/view/InputDevice.java
diff options
context:
space:
mode:
authorChris Ye <lzye@google.com>2021-01-26 12:43:00 -0800
committerChris Ye <lzye@google.com>2021-02-01 22:13:10 +0000
commit4aea1b05f425c8afaa7f43d2191d1e33ea657d2f (patch)
tree25ce97e63cf4a94a6ed365bb3bd11fb74c22f52d /core/java/android/view/InputDevice.java
parent0da9a43002ec27d502e961db2c2d156fd1e38a79 (diff)
Add SOURCE_SENSOR to InputDevice API.
Add input device source type SOURCE_SENSOR to InputDevice API. SOURCE_SENSOR is not used to identify KeyEvent or MotionEvent but it can be used to classifiy an input device is sensor capable. Bug: 170131554 Test: atest InputDeviceSensorManagerTest Change-Id: Iae93a771e69dda1f7bb8577632ea48ca79189b30 Merged-In: Iae93a771e69dda1f7bb8577632ea48ca79189b30
Diffstat (limited to 'core/java/android/view/InputDevice.java')
-rw-r--r--core/java/android/view/InputDevice.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index f4b90e1f7b44..242188991e27 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -323,6 +323,13 @@ public final class InputDevice implements Parcelable {
public static final int SOURCE_HDMI = 0x02000000 | SOURCE_CLASS_BUTTON;
/**
+ * The input source is a sensor associated with the input device.
+ *
+ * @see #SOURCE_CLASS_NONE
+ */
+ public static final int SOURCE_SENSOR = 0x04000000 | SOURCE_CLASS_NONE;
+
+ /**
* A special input source constant that is used when filtering input devices
* to match devices that provide any type of input source.
*/