summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/InputDevice.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index f43e4ab3..afc7b3e 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -574,6 +574,16 @@ public final class InputDevice implements Parcelable {
}
/**
+ * Gets whether the device is capable of producing the list of keycodes.
+ * @param keys The list of android keycodes to check for.
+ * @return An array of booleans where each member specifies whether the device is capable of
+ * generating the keycode given by the corresponding value at the same index in the keys array.
+ */
+ public boolean[] hasKeys(int... keys) {
+ return InputManager.getInstance().deviceHasKeys(mId, keys);
+ }
+
+ /**
* Gets information about the range of values for a particular {@link MotionEvent} axis.
* If the device supports multiple sources, the same axis may have different meanings
* for each source. Returns information about the first axis found for any source.