am 33784085: Merge "Don\'t dismiss boot messages before keyguard is ready" into lmp-dev
* commit '337840857d0365e318b9060bc202abe27f9daf3f': Don't dismiss boot messages before keyguard is ready
This commit is contained in:
@@ -279,6 +279,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
int[] mNavigationBarHeightForRotation = new int[4];
|
||||
int[] mNavigationBarWidthForRotation = new int[4];
|
||||
|
||||
boolean mBootMessageNeedsHiding;
|
||||
KeyguardServiceDelegate mKeyguardDelegate;
|
||||
// The following are only accessed on the mHandler thread.
|
||||
boolean mKeyguardDrawComplete;
|
||||
@@ -537,6 +538,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
private static final int MSG_WAKING_UP = 8;
|
||||
private static final int MSG_DISPATCH_SHOW_RECENTS = 9;
|
||||
private static final int MSG_DISPATCH_SHOW_GLOBAL_ACTIONS = 10;
|
||||
private static final int MSG_HIDE_BOOT_MESSAGE = 11;
|
||||
|
||||
private class PolicyHandler extends Handler {
|
||||
@Override
|
||||
@@ -579,6 +581,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
case MSG_WAKING_UP:
|
||||
handleWakingUp((ScreenOnListener) msg.obj);
|
||||
break;
|
||||
case MSG_HIDE_BOOT_MESSAGE:
|
||||
handleHideBootMessage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1096,9 +1101,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
initializeHdmiState();
|
||||
|
||||
// Match current screen state.
|
||||
if (mPowerManager.isInteractive()) {
|
||||
wakingUp(null);
|
||||
} else {
|
||||
if (!mPowerManager.isInteractive()) {
|
||||
goingToSleep(WindowManagerPolicy.OFF_BECAUSE_OF_USER);
|
||||
}
|
||||
}
|
||||
@@ -4650,6 +4653,26 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
}
|
||||
|
||||
setKeyguardDrawn();
|
||||
|
||||
if (mBootMessageNeedsHiding) {
|
||||
handleHideBootMessage();
|
||||
mBootMessageNeedsHiding = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void handleHideBootMessage() {
|
||||
if (mBootMsgDialog == null) {
|
||||
if (DEBUG_WAKEUP) Slog.d(TAG, "handleHideBootMessage: boot message not up");
|
||||
return;
|
||||
}
|
||||
if (!mKeyguardDrawComplete || !mWindowManagerDrawComplete) {
|
||||
if (DEBUG_WAKEUP) Slog.d(TAG, "handleHideBootMessage: deferring until keyguard ready");
|
||||
mBootMessageNeedsHiding = true;
|
||||
return;
|
||||
}
|
||||
if (DEBUG_WAKEUP) Slog.d(TAG, "handleHideBootMessage: dismissing");
|
||||
mBootMsgDialog.dismiss();
|
||||
mBootMsgDialog = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -5107,14 +5130,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void hideBootMessages() {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override public void run() {
|
||||
if (mBootMsgDialog != null) {
|
||||
mBootMsgDialog.dismiss();
|
||||
mBootMsgDialog = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
mHandler.sendEmptyMessage(MSG_HIDE_BOOT_MESSAGE);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
@@ -11258,7 +11258,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
final WindowList windows = getDefaultWindowListLocked();
|
||||
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
|
||||
final WindowState win = windows.get(winNdx);
|
||||
if (win.mHasSurface) {
|
||||
if (win.mHasSurface && win.mAppToken != null) {
|
||||
win.mWinAnimator.mDrawState = WindowStateAnimator.DRAW_PENDING;
|
||||
// Force add to mResizingWindows.
|
||||
win.mLastContentInsets.set(-1, -1, -1, -1);
|
||||
|
||||
Reference in New Issue
Block a user