Skip to content

Commit 76eb103

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Defer the Surface.show until animation phase."
2 parents 1bf4d5f + de6198e commit 76eb103

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

services/java/com/android/server/wm/WindowStateAnimator.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ public void prepareSurfaceLocked(final boolean recoveringMemory) {
978978

979979
setSurfaceBoundaries(recoveringMemory);
980980

981-
if (w.mAttachedHidden || !w.isReadyForDisplay() || !w.isDrawnLw()) {
981+
if (w.mAttachedHidden || !w.isReadyForDisplay()) {
982982
if (!mLastHidden) {
983983
//dump();
984984
mLastHidden = true;
@@ -1136,17 +1136,15 @@ boolean performShowLocked() {
11361136
+ " animating=" + mAnimating
11371137
+ " tok animating="
11381138
+ (mWin.mAppToken != null ? mWin.mAppToken.mAppAnimator.animating : false));
1139-
if (!showSurfaceRobustlyLocked()) {
1140-
return false;
1141-
}
11421139

11431140
mService.enableScreenIfNeededLocked();
11441141

11451142
applyEnterAnimationLocked();
11461143

1144+
// Force the show in the next prepareSurfaceLocked() call.
11471145
mLastAlpha = -1;
1148-
mLastHidden = false;
11491146
mDrawState = HAS_DRAWN;
1147+
mService.scheduleAnimationLocked();
11501148

11511149
int i = mWin.mChildWindows.size();
11521150
while (i > 0) {

0 commit comments

Comments
 (0)