diff options
| author | Craig Mautner <cmautner@google.com> | 2013-06-07 10:35:44 -0700 |
|---|---|---|
| committer | Craig Mautner <cmautner@google.com> | 2013-06-12 10:59:16 -0700 |
| commit | 037aa8d434984840691378f3cc7d99d63dcc4076 (patch) | |
| tree | fa2ffc022ec2c35282e4931752156f696dda81fa /core/java/android/view/WindowManagerPolicy.java | |
| parent | 97f41383eb2bb098767ca153e470009fea810540 (diff) | |
Centralize all system InputEventReceiver monitors.
Implement all system level InputEvent monitors as new
InputEventListeners. Only one InputChannel required and monitoring
can be enabled or disabled by registering with WindowManagerService.
Change-Id: I64714ab858342ed183c62b421098478ffb6637bc
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
| -rw-r--r-- | core/java/android/view/WindowManagerPolicy.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 6291e628698e..c735dd7b45d7 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -408,11 +408,6 @@ public interface WindowManagerPolicy { public int getLidState(); /** - * Creates an input channel that will receive all input from the input dispatcher. - */ - public InputChannel monitorInput(String name); - - /** * Switch the keyboard layout for the given device. * Direction should be +1 or -1 to go to the next or previous keyboard layout. */ @@ -425,6 +420,21 @@ public interface WindowManagerPolicy { * Return the window manager lock needed to correctly call "Lw" methods. */ public Object getWindowManagerLock(); + + /** Register a system listener for touch events */ + void registerPointerEventListener(PointerEventListener listener); + + /** Unregister a system listener for touch events */ + void unregisterPointerEventListener(PointerEventListener listener); + } + + public interface PointerEventListener { + /** + * 1. onPointerEvent will be called on the service.UiThread. + * 2. motionEvent will be recycled after onPointerEvent returns so if it is needed later a + * copy() must be made and the copy must be recycled. + **/ + public void onPointerEvent(MotionEvent motionEvent); } /** Window has been added to the screen. */ |
