Merge "Deliver onEnterAnimationComplete when there is no transition animation."

This commit is contained in:
Filip Gruszczynski
2016-01-30 19:36:30 +00:00
committed by Android (Google) Code Review

View File

@@ -4065,6 +4065,7 @@ public class WindowManagerService extends IWindowManager.Stub
// * or the token was marked as hidden and is exiting before we had a chance to play the
// transition animation
// * or this is an opening app and windows are being replaced.
boolean visibilityChanged = false;
if (wtoken.hidden == visible || (wtoken.hidden && wtoken.mIsExiting) ||
(visible && wtoken.waitingForReplacement())) {
boolean changed = false;
@@ -4131,6 +4132,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
wtoken.hidden = wtoken.hiddenRequested = !visible;
visibilityChanged = true;
if (!visible) {
unsetAppFreezingScreenLocked(wtoken, true, true);
} else {
@@ -4168,6 +4170,13 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
if (visibilityChanged && visible && !delayed) {
// The token was made immediately visible, there will be no entrance animation. We need
// to inform the client the enter animation was finished.
wtoken.mEnteringAnimation = true;
mActivityManagerAppTransitionNotifier.onAppTransitionFinishedLocked(wtoken.token);
}
return delayed;
}