OSDN Git Service

Allow performShowLocked when transition animation started
authorChong Zhang <chz@google.com>
Mon, 15 Aug 2016 01:47:54 +0000 (18:47 -0700)
committerChong Zhang <chz@google.com>
Mon, 15 Aug 2016 17:52:59 +0000 (17:52 +0000)
Some transitions can have no animation, in which case
isReadyForDisplayIgnoringKeyguard() will wait for VIEW visibility
to become VISIBLE. But if we have a saved surface, the transition
could have already started. This causes exiting app to be hidden,
while entering app's performShowLocked() still hold back waiting
for the relayout to visible.

If we started animating with saved surface, it should also count
as transition animation started.

b/30855380

Change-Id: I6260a323b48e57d8337267d9136f630226a48dc8

services/core/java/com/android/server/wm/WindowState.java

index a00ac5d..81545b6 100644 (file)
@@ -1334,7 +1334,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
                 && ((!mAttachedHidden && mViewVisibility == View.VISIBLE && !mRootToken.hidden)
                         || mWinAnimator.mAnimation != null
                         || ((atoken != null) && (atoken.mAppAnimator.animation != null)
-                                && !mWinAnimator.isDummyAnimation()));
+                                && !mWinAnimator.isDummyAnimation())
+                        || isAnimatingWithSavedSurface());
     }
 
     /**