diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-06-24 12:14:49 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2012-06-24 12:23:58 -0700 |
| commit | 08a746a0c60d19eb2211924ffd9fe1e452a261a6 (patch) | |
| tree | 9b54a89e96467fb9c770565108aa7085703bff12 | |
| parent | 40a0376ea5ac597d8df04fd3e4ad8bde7ac7c9ec (diff) | |
| download | frameworks_base-08a746a0c60d19eb2211924ffd9fe1e452a261a6.zip frameworks_base-08a746a0c60d19eb2211924ffd9fe1e452a261a6.tar.gz frameworks_base-08a746a0c60d19eb2211924ffd9fe1e452a261a6.tar.bz2 | |
Don't enable input dispatch until display enabled.
Bug: 6263070
Change-Id: I05d036fc1d9ec06d164d6743d45bb3f199cfab47
| -rwxr-xr-x | services/java/com/android/server/wm/WindowManagerService.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 73bfe8e..f84451e 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -5285,6 +5285,9 @@ public class WindowManagerService extends IWindowManager.Stub } catch (RemoteException ex) { Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!"); } + + // Enable input dispatch. + mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled); } mPolicy.enableScreenAfterBoot(); @@ -6636,7 +6639,8 @@ public class WindowManagerService extends IWindowManager.Stub // ------------------------------------------------------------- final InputMonitor mInputMonitor = new InputMonitor(this); - + private boolean mEventDispatchingEnabled; + public void pauseKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { @@ -6672,7 +6676,10 @@ public class WindowManagerService extends IWindowManager.Stub } synchronized (mWindowMap) { - mInputMonitor.setEventDispatchingLw(enabled); + mEventDispatchingEnabled = enabled; + if (mDisplayEnabled) { + mInputMonitor.setEventDispatchingLw(enabled); + } sendScreenStatusToClientsLocked(); } } |
