Merge "Don't enable input dispatch until display enabled." into jb-dev
This commit is contained in:
@@ -5285,6 +5285,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
|
Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable input dispatch.
|
||||||
|
mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
mPolicy.enableScreenAfterBoot();
|
mPolicy.enableScreenAfterBoot();
|
||||||
@@ -6636,6 +6639,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
final InputMonitor mInputMonitor = new InputMonitor(this);
|
final InputMonitor mInputMonitor = new InputMonitor(this);
|
||||||
|
private boolean mEventDispatchingEnabled;
|
||||||
|
|
||||||
public void pauseKeyDispatching(IBinder _token) {
|
public void pauseKeyDispatching(IBinder _token) {
|
||||||
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
|
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
|
||||||
@@ -6672,7 +6676,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
|
mEventDispatchingEnabled = enabled;
|
||||||
|
if (mDisplayEnabled) {
|
||||||
mInputMonitor.setEventDispatchingLw(enabled);
|
mInputMonitor.setEventDispatchingLw(enabled);
|
||||||
|
}
|
||||||
sendScreenStatusToClientsLocked();
|
sendScreenStatusToClientsLocked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user