am 2af7b915: Merge "Redraw all windows earlier in power on sequence." into jb-dev
* commit '2af7b9151f8df3581e38847ac711185426df5dea': Redraw all windows earlier in power on sequence.
This commit is contained in:
@@ -3506,6 +3506,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
}
|
}
|
||||||
if (screenOnListener != null) {
|
if (screenOnListener != null) {
|
||||||
if (mKeyguardMediator != null) {
|
if (mKeyguardMediator != null) {
|
||||||
|
try {
|
||||||
|
mWindowManager.setEventDispatching(true);
|
||||||
|
} catch (RemoteException unhandled) {
|
||||||
|
}
|
||||||
mKeyguardMediator.onScreenTurnedOn(new KeyguardViewManager.ShowListener() {
|
mKeyguardMediator.onScreenTurnedOn(new KeyguardViewManager.ShowListener() {
|
||||||
@Override public void onShown(IBinder windowToken) {
|
@Override public void onShown(IBinder windowToken) {
|
||||||
if (windowToken != null) {
|
if (windowToken != null) {
|
||||||
|
|||||||
@@ -6621,15 +6621,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
public void setEventDispatching(boolean enabled) {
|
public void setEventDispatching(boolean enabled) {
|
||||||
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
|
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
|
||||||
"resumeKeyDispatching()")) {
|
"setEventDispatching()")) {
|
||||||
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
|
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
mInputMonitor.setEventDispatchingLw(enabled);
|
mInputMonitor.setEventDispatchingLw(enabled);
|
||||||
|
sendScreenStatusToClientsLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
sendScreenStatusToClients();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBinder getFocusedWindowClientToken() {
|
public IBinder getFocusedWindowClientToken() {
|
||||||
@@ -6735,7 +6734,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
mPolicy.systemReady();
|
mPolicy.systemReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendScreenStatusToClients() {
|
private void sendScreenStatusToClientsLocked() {
|
||||||
final ArrayList<WindowState> windows = mWindows;
|
final ArrayList<WindowState> windows = mWindows;
|
||||||
final int count = windows.size();
|
final int count = windows.size();
|
||||||
boolean on = mPowerManager.isScreenOn();
|
boolean on = mPowerManager.isScreenOn();
|
||||||
|
|||||||
Reference in New Issue
Block a user