Add support for the PointerLocation overlay.
This change involves adding a new method to IWindowManager, monitorInput() that returns an InputChannel to receive a copy of all input that is dispatched to applications. The caller must have the READ_INPUT_STATE permission to make this request (similar to other window manager methods such as getKeycodeState). Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
This commit is contained in:
@ -4382,11 +4382,19 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
return mInputManager.getKeyCodeState(-1, InputDevice.SOURCE_DPAD, sw);
|
||||
}
|
||||
|
||||
|
||||
public boolean hasKeys(int[] keycodes, boolean[] keyExists) {
|
||||
return mInputManager.hasKeys(-1, InputDevice.SOURCE_ANY, keycodes, keyExists);
|
||||
}
|
||||
|
||||
public InputChannel monitorInput(String inputChannelName) {
|
||||
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
|
||||
"monitorInput()")) {
|
||||
throw new SecurityException("Requires READ_INPUT_STATE permission");
|
||||
}
|
||||
return mInputManager.monitorInput(inputChannelName);
|
||||
}
|
||||
|
||||
public void enableScreenAfterBoot() {
|
||||
synchronized(mWindowMap) {
|
||||
if (mSystemBooted) {
|
||||
|
Reference in New Issue
Block a user