summaryrefslogtreecommitdiff
path: root/core/java/android/view/InputDevice.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-05 18:57:33 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-05 19:33:11 -0700
commitac14351e16e1258f1cb54e2bf772b8be004eb2b8 (patch)
tree55c22fe8e19d35764f00a6ffad899e4fd2c4ccd0 /core/java/android/view/InputDevice.java
parent030711c39b6093024d784c1c3d7566bd5a3e3489 (diff)
Move some APIs from window manager to input manager.
Simplified input injection API down to just one call. Removed all input state reading API. It was only used by the window manager policy and required a permission that applications could not obtain. READ_INPUT_STATE is now unused and deprecated. Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
Diffstat (limited to 'core/java/android/view/InputDevice.java')
-rwxr-xr-xcore/java/android/view/InputDevice.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index 91e47e6b7f98..93a0185e4658 100755
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -16,9 +16,9 @@
package android.view;
+import android.hardware.input.InputManager;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.RemoteException;
import java.util.ArrayList;
import java.util.List;
@@ -301,13 +301,7 @@ public final class InputDevice implements Parcelable {
* @return The input device or null if not found.
*/
public static InputDevice getDevice(int id) {
- IWindowManager wm = Display.getWindowManager();
- try {
- return wm.getInputDevice(id);
- } catch (RemoteException ex) {
- throw new RuntimeException(
- "Could not get input device information from Window Manager.", ex);
- }
+ return InputManager.getInputDevice(id);
}
/**
@@ -315,13 +309,7 @@ public final class InputDevice implements Parcelable {
* @return The input device ids.
*/
public static int[] getDeviceIds() {
- IWindowManager wm = Display.getWindowManager();
- try {
- return wm.getInputDeviceIds();
- } catch (RemoteException ex) {
- throw new RuntimeException(
- "Could not get input device ids from Window Manager.", ex);
- }
+ return InputManager.getInputDeviceIds();
}
/**