Don't enable input dispatch until display enabled.

Bug: 6263070
Change-Id: I05d036fc1d9ec06d164d6743d45bb3f199cfab47
This commit is contained in:
Jeff Brown
2012-06-24 12:14:49 -07:00
parent 40a0376ea5
commit 08a746a0c6

View File

@@ -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();
}
}