Merge "Ignore "mLastHidden" state when deciding whether to turnScreenOn." into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cf3b6afe01
@@ -1604,21 +1604,33 @@ class WindowStateAnimator {
|
|||||||
recoveringMemory);
|
recoveringMemory);
|
||||||
mSurfaceController.setLayer(mAnimLayer);
|
mSurfaceController.setLayer(mAnimLayer);
|
||||||
|
|
||||||
if (prepared && mLastHidden && mDrawState == HAS_DRAWN) {
|
if (prepared && mDrawState == HAS_DRAWN) {
|
||||||
if (showSurfaceRobustlyLocked()) {
|
if (mLastHidden) {
|
||||||
markPreservedSurfaceForDestroy();
|
if (showSurfaceRobustlyLocked()) {
|
||||||
mAnimator.requestRemovalOfReplacedWindows(w);
|
markPreservedSurfaceForDestroy();
|
||||||
mLastHidden = false;
|
mAnimator.requestRemovalOfReplacedWindows(w);
|
||||||
if (mIsWallpaper) {
|
mLastHidden = false;
|
||||||
w.dispatchWallpaperVisibility(true);
|
if (mIsWallpaper) {
|
||||||
|
w.dispatchWallpaperVisibility(true);
|
||||||
|
}
|
||||||
|
// This draw means the difference between unique content and mirroring.
|
||||||
|
// Run another pass through performLayout to set mHasContent in the
|
||||||
|
// LogicalDisplay.
|
||||||
|
mAnimator.setPendingLayoutChanges(w.getDisplayId(),
|
||||||
|
WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM);
|
||||||
|
} else {
|
||||||
|
w.setOrientationChanging(false);
|
||||||
}
|
}
|
||||||
// This draw means the difference between unique content and mirroring.
|
}
|
||||||
// Run another pass through performLayout to set mHasContent in the
|
// We process mTurnOnScreen even for windows which have already
|
||||||
// LogicalDisplay.
|
// been shown, to handle cases where windows are not necessarily
|
||||||
mAnimator.setPendingLayoutChanges(w.getDisplayId(),
|
// hidden while the screen is turning off.
|
||||||
WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM);
|
// TODO(b/63773439): These cases should be eliminated, though we probably still
|
||||||
} else {
|
// want to process mTurnOnScreen in this way for clarity.
|
||||||
w.setOrientationChanging(false);
|
if (mWin.mTurnOnScreen) {
|
||||||
|
if (DEBUG_VISIBILITY) Slog.v(TAG, "Show surface turning screen on: " + mWin);
|
||||||
|
mWin.mTurnOnScreen = false;
|
||||||
|
mAnimator.mBulkUpdateParams |= SET_TURN_ON_SCREEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasSurface()) {
|
if (hasSurface()) {
|
||||||
@@ -1730,11 +1742,6 @@ class WindowStateAnimator {
|
|||||||
if (!shown)
|
if (!shown)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (mWin.mTurnOnScreen) {
|
|
||||||
if (DEBUG_VISIBILITY) Slog.v(TAG, "Show surface turning screen on: " + mWin);
|
|
||||||
mWin.mTurnOnScreen = false;
|
|
||||||
mAnimator.mBulkUpdateParams |= SET_TURN_ON_SCREEN;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user