Merge "Revert "Fix the starting window could not be removed."" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3c1b83c3bb
@@ -1940,6 +1940,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
mStartingData = null;
|
mStartingData = null;
|
||||||
startingSurface = null;
|
startingSurface = null;
|
||||||
startingWindow = null;
|
startingWindow = null;
|
||||||
|
startingDisplayed = false;
|
||||||
if (surface == null) {
|
if (surface == null) {
|
||||||
ProtoLog.v(WM_DEBUG_STARTING_WINDOW,
|
ProtoLog.v(WM_DEBUG_STARTING_WINDOW,
|
||||||
"startingWindow was set but startingSurface==null, couldn't "
|
"startingWindow was set but startingSurface==null, couldn't "
|
||||||
@@ -5456,6 +5457,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
if (mLastTransactionSequence != mWmService.mTransactionSequence) {
|
if (mLastTransactionSequence != mWmService.mTransactionSequence) {
|
||||||
mLastTransactionSequence = mWmService.mTransactionSequence;
|
mLastTransactionSequence = mWmService.mTransactionSequence;
|
||||||
mNumDrawnWindows = 0;
|
mNumDrawnWindows = 0;
|
||||||
|
startingDisplayed = false;
|
||||||
|
|
||||||
// There is the main base application window, even if it is exiting, wait for it
|
// There is the main base application window, even if it is exiting, wait for it
|
||||||
mNumInterestingWindows = findMainWindow(false /* includeStartingApp */) != null ? 1 : 0;
|
mNumInterestingWindows = findMainWindow(false /* includeStartingApp */) != null ? 1 : 0;
|
||||||
|
|||||||
@@ -2191,9 +2191,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
|
|
||||||
if (wasVisible) {
|
if (wasVisible) {
|
||||||
final int transit = (!startingWindow) ? TRANSIT_EXIT : TRANSIT_PREVIEW_DONE;
|
final int transit = (!startingWindow) ? TRANSIT_EXIT : TRANSIT_PREVIEW_DONE;
|
||||||
final int flags = startingWindow ? 0 /* self */ : PARENTS;
|
|
||||||
// Try starting an animation.
|
// Try starting an animation.
|
||||||
if (mWinAnimator.applyAnimationLocked(transit, false, flags)) {
|
if (mWinAnimator.applyAnimationLocked(transit, false)) {
|
||||||
mAnimatingExit = true;
|
mAnimatingExit = true;
|
||||||
|
|
||||||
// mAnimatingExit affects canAffectSystemUiFlags(). Run layout such that
|
// mAnimatingExit affects canAffectSystemUiFlags(). Run layout such that
|
||||||
@@ -2205,9 +2205,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
mWmService.mAccessibilityController.onWindowTransitionLocked(this, transit);
|
mWmService.mAccessibilityController.onWindowTransitionLocked(this, transit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final boolean isAnimating = startingWindow
|
final boolean isAnimating = isAnimating(TRANSITION | PARENTS)
|
||||||
? isAnimating(0)
|
|
||||||
: isAnimating(TRANSITION | PARENTS)
|
|
||||||
&& (mActivityRecord == null || !mActivityRecord.isWaitingForTransitionStart());
|
&& (mActivityRecord == null || !mActivityRecord.isWaitingForTransitionStart());
|
||||||
final boolean lastWindowIsStartingWindow = startingWindow && mActivityRecord != null
|
final boolean lastWindowIsStartingWindow = startingWindow && mActivityRecord != null
|
||||||
&& mActivityRecord.isLastWindow(this);
|
&& mActivityRecord.isLastWindow(this);
|
||||||
@@ -2229,9 +2227,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startingWindow && mActivityRecord != null) {
|
|
||||||
mActivityRecord.startingDisplayed = false;
|
|
||||||
}
|
|
||||||
removeImmediately();
|
removeImmediately();
|
||||||
// Removing a visible window will effect the computed orientation
|
// Removing a visible window will effect the computed orientation
|
||||||
// So just update orientation if needed.
|
// So just update orientation if needed.
|
||||||
|
|||||||
@@ -1400,25 +1400,9 @@ class WindowStateAnimator {
|
|||||||
* the switch statement below.
|
* the switch statement below.
|
||||||
* @param isEntrance The animation type the last time this was called. Used to keep from
|
* @param isEntrance The animation type the last time this was called. Used to keep from
|
||||||
* loading the same animation twice.
|
* loading the same animation twice.
|
||||||
* @return {@code true} if an animation has been loaded, includes the parents.
|
* @return true if an animation has been loaded.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
boolean applyAnimationLocked(int transit, boolean isEntrance) {
|
boolean applyAnimationLocked(int transit, boolean isEntrance) {
|
||||||
return applyAnimationLocked(transit, isEntrance, PARENTS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Choose the correct animation and set it to the passed WindowState.
|
|
||||||
* @param transit If AppTransition.TRANSIT_PREVIEW_DONE and the app window has been drawn
|
|
||||||
* then the animation will be app_starting_exit. Any other value loads the animation from
|
|
||||||
* the switch statement below.
|
|
||||||
* @param isEntrance The animation type the last time this was called. Used to keep from
|
|
||||||
* loading the same animation twice.
|
|
||||||
* @param flags The combination of bitmask flags to specify targets and condition for
|
|
||||||
* checking animating status. See {@link WindowContainer.AnimationFlags}.
|
|
||||||
* @return {@code true} if an animation has been loaded.
|
|
||||||
*/
|
|
||||||
boolean applyAnimationLocked(int transit, boolean isEntrance, int flags) {
|
|
||||||
if (mWin.isAnimating() && mAnimationIsEntrance == isEntrance) {
|
if (mWin.isAnimating() && mAnimationIsEntrance == isEntrance) {
|
||||||
// If we are trying to apply an animation, but already running
|
// If we are trying to apply an animation, but already running
|
||||||
// an animation of the same type, then just leave that one alone.
|
// an animation of the same type, then just leave that one alone.
|
||||||
@@ -1488,7 +1472,7 @@ class WindowStateAnimator {
|
|||||||
mWin.getDisplayContent().adjustForImeIfNeeded();
|
mWin.getDisplayContent().adjustForImeIfNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
return mWin.isAnimating(flags);
|
return mWin.isAnimating(PARENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dumpDebug(ProtoOutputStream proto, long fieldId) {
|
void dumpDebug(ProtoOutputStream proto, long fieldId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user