summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Stefan Kuhne <skuhne@google.com> 2015-06-10 00:21:46 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-06-10 00:21:49 +0000
commit011c133e3c98ccf95fe4626d30c739c5a35d986e (patch)
tree5a2ccf262b0fa43cc9a6a9264cc734319bd50bfb
parentc2ae0090d2f6b9f36b4027e79f0430d29853a193 (diff)
parent7dcf08c6b2778b60992005b16d8fb297e6ec499a (diff)
Merge "Dont create a dummy animation for a transferred animation" into mnc-dev
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java14
-rw-r--r--services/core/java/com/android/server/wm/WindowStateAnimator.java12
2 files changed, 9 insertions, 17 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 38e27653c2ec..486105066f7e 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2734,15 +2734,12 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
final AppWindowToken appToken = win.mAppToken;
- // Prevent an immediate window exit only for a real animation, ignoring e.g.
- // dummy animations.
- final boolean inAnimation = win.mWinAnimator.isWindowAnimatingNow();
// The starting window is the last window in this app token and it isn't animating.
// Allow it to be removed now as there is no additional window or animation that will
// trigger its removal.
final boolean lastWinStartingNotAnimating = startingWindow && appToken!= null
- && appToken.allAppWindows.size() == 1 && !inAnimation;
- if (!lastWinStartingNotAnimating && (win.mExiting || inAnimation)) {
+ && appToken.allAppWindows.size() == 1 && !win.mWinAnimator.isAnimating();
+ if (!lastWinStartingNotAnimating && (win.mExiting || win.mWinAnimator.isAnimating())) {
// The exit animation is running... wait for it!
win.mExiting = true;
win.mRemoveOnExit = true;
@@ -4675,7 +4672,12 @@ public class WindowManagerService extends IWindowManager.Stub
// If we are preparing an app transition, then delay changing
// the visibility of this token until we execute that transition.
if (okToDisplay() && mAppTransition.isTransitionSet()) {
- if (!wtoken.startingDisplayed || mSkipAppTransitionAnimation) {
+ // A dummy animation is a placeholder animation which informs others that an
+ // 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.startingDisplayed || mSkipAppTransitionAnimation)) {
if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Setting dummy animation on: " + wtoken);
wtoken.mAppAnimator.setDummyAnimation();
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index b42c8ebe76ef..5064d8fd3a1e 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -251,21 +251,11 @@ class WindowStateAnimator {
&& mAppAnimator.animation == AppWindowAnimator.sDummyAnimation;
}
- /** Is this window currently set to animate or currently animating?
- * NOTE: The method will return true for cases where the window isn't currently animating, but
- * is set to animate. i.e. if the window animation is currently set to a dummy placeholder
- * animation. Use {@link #isWindowAnimatingNow} to know if the window is currently running a
- * real animation. */
+ /** Is this window currently set to animate or currently animating? */
boolean isWindowAnimating() {
return mAnimation != null;
}
- /** Is the window performing a real animation and not a dummy which is only waiting for an
- * an animation to start? */
- boolean isWindowAnimatingNow() {
- return isWindowAnimating() && !isDummyAnimation();
- }
-
void cancelExitAnimationForNextAnimationLocked() {
if (mAnimation != null) {
mAnimation.cancel();