diff options
| author | 2019-06-05 11:45:42 +0000 | |
|---|---|---|
| committer | 2019-06-05 11:45:42 +0000 | |
| commit | c5d71fc809663480efc1931edcd3b8a1ca9eb8e4 (patch) | |
| tree | bcb5434fcd2c3047e30a5845ee04b70456e19964 | |
| parent | eeffe0c9dde032e926db50812633971d7f6aa30a (diff) | |
| parent | c9d0d0039255e7117eb326fab2b64a7180dceeb5 (diff) | |
Merge "Fix a bug about missing committing app visibility" into qt-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/AppWindowToken.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index cae7612e0fcc..4a9a3f71f90e 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -176,6 +176,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree boolean inPendingTransaction; boolean allDrawn; private boolean mLastAllDrawn; + private boolean mUseTransferredAnimation; // Set to true when this app creates a surface while in the middle of an animation. In that // case do not clear allDrawn until the animation completes. @@ -618,9 +619,12 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree boolean runningAppAnimation = false; if (transit != WindowManager.TRANSIT_UNSET) { - if (applyAnimationLocked(lp, transit, visible, isVoiceInteraction)) { - delayed = runningAppAnimation = true; + if (mUseTransferredAnimation) { + runningAppAnimation = isReallyAnimating(); + } else if (applyAnimationLocked(lp, transit, visible, isVoiceInteraction)) { + runningAppAnimation = true; } + delayed = runningAppAnimation; final WindowState window = findMainWindow(); if (window != null && accessibilityController != null) { accessibilityController.onAppWindowTransitionLocked(window, transit); @@ -667,6 +671,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree getDisplayContent().getInputMonitor().updateInputWindowsLw(false /*force*/); } } + mUseTransferredAnimation = false; if (isReallyAnimating()) { delayed = true; @@ -1531,9 +1536,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree transferAnimation(fromToken); // When transferring an animation, we no longer need to apply an animation to the - // the token we transfer the animation over. Thus, remove the animation from - // pending opening apps. - getDisplayContent().mOpeningApps.remove(this); + // the token we transfer the animation over. Thus, set this flag to indicate we've + // transferred the animation. + mUseTransferredAnimation = true; mWmService.updateFocusedWindowLocked( UPDATE_FOCUS_WILL_PLACE_SURFACES, true /*updateInputWindows*/); |