am db65cc52: am a3a59a2f: Merge "Don\'t enable input dispatch until display enabled." into jb-dev
* commit 'db65cc520ebb3f9cfafa4a9d5be9f07621814213':
Don't enable input dispatch until display enabled.
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 4ef5fd6..271488e 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -5272,6 +5272,9 @@
} catch (RemoteException ex) {
Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
}
+
+ // Enable input dispatch.
+ mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
mPolicy.enableScreenAfterBoot();
@@ -6623,7 +6626,8 @@
// -------------------------------------------------------------
final InputMonitor mInputMonitor = new InputMonitor(this);
-
+ private boolean mEventDispatchingEnabled;
+
public void pauseKeyDispatching(IBinder _token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"pauseKeyDispatching()")) {
@@ -6659,7 +6663,10 @@
}
synchronized (mWindowMap) {
- mInputMonitor.setEventDispatchingLw(enabled);
+ mEventDispatchingEnabled = enabled;
+ if (mDisplayEnabled) {
+ mInputMonitor.setEventDispatchingLw(enabled);
+ }
sendScreenStatusToClientsLocked();
}
}