Loading services/core/java/com/android/server/wm/AppWindowAnimator.java +8 −4 Original line number Diff line number Diff line Loading @@ -171,17 +171,21 @@ public class AppWindowAnimator { transformation.setAlpha(mAppToken.isVisible() ? 1 : 0); } void setNullAnimation() { animation = null; usingTransferredAnimation = false; } public void clearAnimation() { if (animation != null) { animation = null; animating = true; } clearThumbnail(); setNullAnimation(); if (mAppToken.deferClearAllDrawn) { mAppToken.allDrawn = false; mAppToken.deferClearAllDrawn = false; } usingTransferredAnimation = false; } public boolean isAnimating() { Loading @@ -202,9 +206,9 @@ public class AppWindowAnimator { if (animation != null) { toAppAnimator.animation = animation; animation = null; toAppAnimator.animating = animating; toAppAnimator.animLayerAdjustment = animLayerAdjustment; setNullAnimation(); animLayerAdjustment = 0; toAppAnimator.updateLayers(); updateLayers(); Loading Loading @@ -311,7 +315,7 @@ public class AppWindowAnimator { if (mProlongAnimation == PROLONG_ANIMATION_AT_END) { hasMoreFrames = true; } else { animation = null; setNullAnimation(); clearThumbnail(); if (DEBUG_ANIM) Slog.v(TAG, "Finished animation in " + mAppToken + " @ " + currentTime); Loading services/core/java/com/android/server/wm/AppWindowToken.java +0 −17 Original line number Diff line number Diff line Loading @@ -322,23 +322,6 @@ class AppWindowToken extends WindowToken { } } void setWindowsExiting(boolean exiting) { for (int i = allAppWindows.size() - 1; i >= 0; i--) { WindowState win = allAppWindows.get(i); // If the app already requested to remove its window, we don't modify // its exiting state. Otherwise the stale window won't get removed on // exit and could cause focus to be given to the wrong window. if (!(win.mRemoveOnExit && win.mAnimatingExit)) { win.mAnimatingExit = exiting; } // If we're no longer exiting, remove the window from destroying list if (!win.mAnimatingExit && win.mDestroying) { win.mDestroying = false; service.mDestroySurface.remove(win); } } } // Here we destroy surfaces which have been marked as eligible by the animator, taking care // to ensure the client has finished with them. If the client could still be using them // we will skip destruction and try again when the client has stopped. Loading services/core/java/com/android/server/wm/WindowManagerService.java +9 −4 Original line number Diff line number Diff line Loading @@ -2826,10 +2826,12 @@ public class WindowManagerService extends IWindowManager.Stub if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit, false)) { focusMayChange = isDefaultDisplay; win.mAnimatingExit = true; win.mWinAnimator.mAnimating = true; } else if (win.mWinAnimator.isAnimating()) { // Currently in a hide animation... turn this into // an exit. win.mAnimatingExit = true; win.mWinAnimator.mAnimating = true; } else if (mWallpaperControllerLocked.isWallpaperTarget(win)) { // If the wallpaper is currently behind this // window, we need to change both of them inside Loading Loading @@ -4086,7 +4088,7 @@ public class WindowManagerService extends IWindowManager.Stub if (transit != AppTransition.TRANSIT_UNSET) { if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) { wtoken.mAppAnimator.animation = null; wtoken.mAppAnimator.setNullAnimation(); } if (applyAnimationLocked(wtoken, lp, transit, visible, isVoiceInteraction)) { delayed = runningAppAnimation = true; Loading Loading @@ -4196,7 +4198,7 @@ public class WindowManagerService extends IWindowManager.Stub void updateTokenInPlaceLocked(AppWindowToken wtoken, int transit) { if (transit != AppTransition.TRANSIT_UNSET) { if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) { wtoken.mAppAnimator.animation = null; wtoken.mAppAnimator.setNullAnimation(); } applyAnimationLocked(wtoken, null, transit, false, false); } Loading Loading @@ -4256,7 +4258,6 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ADD_REMOVE) Slog.v( TAG_WM, "No longer Stopped: " + wtoken); wtoken.mAppStopped = false; wtoken.setWindowsExiting(false); mOpeningApps.add(wtoken); wtoken.startingMoved = false; Loading Loading @@ -4288,6 +4289,11 @@ public class WindowManagerService extends IWindowManager.Stub // animation is going on (in this case an application transition). If the animation // was transferred from another application/animator, no dummy animator should be // created since an animation is already in progress. if (wtoken.mAppAnimator.usingTransferredAnimation && wtoken.mAppAnimator.animation == null) { Slog.wtf(TAG_WM, "Will NOT set dummy animation on: " + wtoken + ", using null transfered animation!"); } if (!wtoken.mAppAnimator.usingTransferredAnimation && (!wtoken.startingDisplayed || mSkipAppTransitionAnimation)) { if (DEBUG_APP_TRANSITIONS) Slog.v( Loading @@ -4298,7 +4304,6 @@ public class WindowManagerService extends IWindowManager.Stub if (visible) { wtoken.mEnteringAnimation = true; } else { wtoken.setWindowsExiting(true); mClosingApps.add(wtoken); wtoken.mEnteringAnimation = false; } Loading services/core/java/com/android/server/wm/WindowSurfacePlacer.java +3 −3 Original line number Diff line number Diff line Loading @@ -1158,7 +1158,7 @@ class WindowSurfacePlacer { if (!appAnimator.usingTransferredAnimation) { appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); } wtoken.inPendingTransaction = false; Loading Loading @@ -1231,7 +1231,7 @@ class WindowSurfacePlacer { final AppWindowAnimator appAnimator = wtoken.mAppAnimator; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken); appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); wtoken.inPendingTransaction = false; mService.setTokenVisibilityLocked(wtoken, animLp, false, transit, false, voiceInteraction); Loading Loading @@ -1494,7 +1494,7 @@ class WindowSurfacePlacer { if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now animating app in place " + wtoken); appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); mService.updateTokenInPlaceLocked(wtoken, transit); wtoken.updateReportedVisibilityLocked(); Loading services/core/java/com/android/server/wm/WindowState.java +2 −2 File changed.Contains only whitespace changes. Show changes Loading
services/core/java/com/android/server/wm/AppWindowAnimator.java +8 −4 Original line number Diff line number Diff line Loading @@ -171,17 +171,21 @@ public class AppWindowAnimator { transformation.setAlpha(mAppToken.isVisible() ? 1 : 0); } void setNullAnimation() { animation = null; usingTransferredAnimation = false; } public void clearAnimation() { if (animation != null) { animation = null; animating = true; } clearThumbnail(); setNullAnimation(); if (mAppToken.deferClearAllDrawn) { mAppToken.allDrawn = false; mAppToken.deferClearAllDrawn = false; } usingTransferredAnimation = false; } public boolean isAnimating() { Loading @@ -202,9 +206,9 @@ public class AppWindowAnimator { if (animation != null) { toAppAnimator.animation = animation; animation = null; toAppAnimator.animating = animating; toAppAnimator.animLayerAdjustment = animLayerAdjustment; setNullAnimation(); animLayerAdjustment = 0; toAppAnimator.updateLayers(); updateLayers(); Loading Loading @@ -311,7 +315,7 @@ public class AppWindowAnimator { if (mProlongAnimation == PROLONG_ANIMATION_AT_END) { hasMoreFrames = true; } else { animation = null; setNullAnimation(); clearThumbnail(); if (DEBUG_ANIM) Slog.v(TAG, "Finished animation in " + mAppToken + " @ " + currentTime); Loading
services/core/java/com/android/server/wm/AppWindowToken.java +0 −17 Original line number Diff line number Diff line Loading @@ -322,23 +322,6 @@ class AppWindowToken extends WindowToken { } } void setWindowsExiting(boolean exiting) { for (int i = allAppWindows.size() - 1; i >= 0; i--) { WindowState win = allAppWindows.get(i); // If the app already requested to remove its window, we don't modify // its exiting state. Otherwise the stale window won't get removed on // exit and could cause focus to be given to the wrong window. if (!(win.mRemoveOnExit && win.mAnimatingExit)) { win.mAnimatingExit = exiting; } // If we're no longer exiting, remove the window from destroying list if (!win.mAnimatingExit && win.mDestroying) { win.mDestroying = false; service.mDestroySurface.remove(win); } } } // Here we destroy surfaces which have been marked as eligible by the animator, taking care // to ensure the client has finished with them. If the client could still be using them // we will skip destruction and try again when the client has stopped. Loading
services/core/java/com/android/server/wm/WindowManagerService.java +9 −4 Original line number Diff line number Diff line Loading @@ -2826,10 +2826,12 @@ public class WindowManagerService extends IWindowManager.Stub if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit, false)) { focusMayChange = isDefaultDisplay; win.mAnimatingExit = true; win.mWinAnimator.mAnimating = true; } else if (win.mWinAnimator.isAnimating()) { // Currently in a hide animation... turn this into // an exit. win.mAnimatingExit = true; win.mWinAnimator.mAnimating = true; } else if (mWallpaperControllerLocked.isWallpaperTarget(win)) { // If the wallpaper is currently behind this // window, we need to change both of them inside Loading Loading @@ -4086,7 +4088,7 @@ public class WindowManagerService extends IWindowManager.Stub if (transit != AppTransition.TRANSIT_UNSET) { if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) { wtoken.mAppAnimator.animation = null; wtoken.mAppAnimator.setNullAnimation(); } if (applyAnimationLocked(wtoken, lp, transit, visible, isVoiceInteraction)) { delayed = runningAppAnimation = true; Loading Loading @@ -4196,7 +4198,7 @@ public class WindowManagerService extends IWindowManager.Stub void updateTokenInPlaceLocked(AppWindowToken wtoken, int transit) { if (transit != AppTransition.TRANSIT_UNSET) { if (wtoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) { wtoken.mAppAnimator.animation = null; wtoken.mAppAnimator.setNullAnimation(); } applyAnimationLocked(wtoken, null, transit, false, false); } Loading Loading @@ -4256,7 +4258,6 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ADD_REMOVE) Slog.v( TAG_WM, "No longer Stopped: " + wtoken); wtoken.mAppStopped = false; wtoken.setWindowsExiting(false); mOpeningApps.add(wtoken); wtoken.startingMoved = false; Loading Loading @@ -4288,6 +4289,11 @@ public class WindowManagerService extends IWindowManager.Stub // animation is going on (in this case an application transition). If the animation // was transferred from another application/animator, no dummy animator should be // created since an animation is already in progress. if (wtoken.mAppAnimator.usingTransferredAnimation && wtoken.mAppAnimator.animation == null) { Slog.wtf(TAG_WM, "Will NOT set dummy animation on: " + wtoken + ", using null transfered animation!"); } if (!wtoken.mAppAnimator.usingTransferredAnimation && (!wtoken.startingDisplayed || mSkipAppTransitionAnimation)) { if (DEBUG_APP_TRANSITIONS) Slog.v( Loading @@ -4298,7 +4304,6 @@ public class WindowManagerService extends IWindowManager.Stub if (visible) { wtoken.mEnteringAnimation = true; } else { wtoken.setWindowsExiting(true); mClosingApps.add(wtoken); wtoken.mEnteringAnimation = false; } Loading
services/core/java/com/android/server/wm/WindowSurfacePlacer.java +3 −3 Original line number Diff line number Diff line Loading @@ -1158,7 +1158,7 @@ class WindowSurfacePlacer { if (!appAnimator.usingTransferredAnimation) { appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); } wtoken.inPendingTransaction = false; Loading Loading @@ -1231,7 +1231,7 @@ class WindowSurfacePlacer { final AppWindowAnimator appAnimator = wtoken.mAppAnimator; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken); appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); wtoken.inPendingTransaction = false; mService.setTokenVisibilityLocked(wtoken, animLp, false, transit, false, voiceInteraction); Loading Loading @@ -1494,7 +1494,7 @@ class WindowSurfacePlacer { if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now animating app in place " + wtoken); appAnimator.clearThumbnail(); appAnimator.animation = null; appAnimator.setNullAnimation(); mService.updateTokenInPlaceLocked(wtoken, transit); wtoken.updateReportedVisibilityLocked(); Loading
services/core/java/com/android/server/wm/WindowState.java +2 −2 File changed.Contains only whitespace changes. Show changes