Loading services/core/java/com/android/server/am/ActivityRecord.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo if (mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + this); if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + this); mStartingWindowState = STARTING_WINDOW_REMOVED; mStartingWindowState = STARTING_WINDOW_REMOVED; mWindowContainerController.removeHiddenStartingWindow(); mWindowContainerController.removeStartingWindow(); } } } } Loading services/core/java/com/android/server/wm/AppWindowContainerController.java +1 −17 Original line number Original line Diff line number Diff line Loading @@ -611,23 +611,7 @@ public class AppWindowContainerController return mContainer.getTask().getConfiguration().orientation == snapshot.getOrientation(); return mContainer.getTask().getConfiguration().orientation == snapshot.getOrientation(); } } /** public void removeStartingWindow() { * Remove starting window if the app is currently hidden. It is possible the starting window is * part of its app exit transition animation in which case we delay hiding the app token. The * method allows for removal when window manager has set the app token to hidden. */ public void removeHiddenStartingWindow() { synchronized (mWindowMap) { if (!mContainer.hidden) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Starting window app still visible." + " Ignoring remove request."); return; } removeStartingWindow(); } } void removeStartingWindow() { synchronized (mWindowMap) { synchronized (mWindowMap) { if (mContainer.startingWindow == null) { if (mContainer.startingWindow == null) { if (mContainer.startingData != null) { if (mContainer.startingData != null) { Loading services/core/java/com/android/server/wm/AppWindowToken.java +3 −8 Original line number Original line Diff line number Diff line Loading @@ -448,7 +448,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mChildren.get(i).mWinAnimator.hide("immediately hidden"); mChildren.get(i).mWinAnimator.hide("immediately hidden"); } } SurfaceControl.closeTransaction(); SurfaceControl.closeTransaction(); removeStartingWindow(); } } if (!mService.mClosingApps.contains(this) && !mService.mOpeningApps.contains(this)) { if (!mService.mClosingApps.contains(this) && !mService.mOpeningApps.contains(this)) { Loading Loading @@ -526,12 +525,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return super.checkCompleteDeferredRemoval(); return super.checkCompleteDeferredRemoval(); } } private void removeStartingWindow() { if (startingData != null && getController() != null) { getController().removeStartingWindow(); } } void onRemovedFromDisplay() { void onRemovedFromDisplay() { if (mRemovingFromDisplay) { if (mRemovingFromDisplay) { return; return; Loading Loading @@ -559,7 +552,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken: " if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken: " + this + " delayed=" + delayed + " Callers=" + Debug.getCallers(4)); + this + " delayed=" + delayed + " Callers=" + Debug.getCallers(4)); removeStartingWindow(); if (startingData != null && getController() != null) { getController().removeStartingWindow(); } // If this window was animating, then we need to ensure that the app transition notifies // If this window was animating, then we need to ensure that the app transition notifies // that animations have completed in WMS.handleAnimatingStoppedAndTransitionLocked(), so // that animations have completed in WMS.handleAnimatingStoppedAndTransitionLocked(), so Loading Loading
services/core/java/com/android/server/am/ActivityRecord.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2161,7 +2161,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo if (mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + this); if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + this); mStartingWindowState = STARTING_WINDOW_REMOVED; mStartingWindowState = STARTING_WINDOW_REMOVED; mWindowContainerController.removeHiddenStartingWindow(); mWindowContainerController.removeStartingWindow(); } } } } Loading
services/core/java/com/android/server/wm/AppWindowContainerController.java +1 −17 Original line number Original line Diff line number Diff line Loading @@ -611,23 +611,7 @@ public class AppWindowContainerController return mContainer.getTask().getConfiguration().orientation == snapshot.getOrientation(); return mContainer.getTask().getConfiguration().orientation == snapshot.getOrientation(); } } /** public void removeStartingWindow() { * Remove starting window if the app is currently hidden. It is possible the starting window is * part of its app exit transition animation in which case we delay hiding the app token. The * method allows for removal when window manager has set the app token to hidden. */ public void removeHiddenStartingWindow() { synchronized (mWindowMap) { if (!mContainer.hidden) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Starting window app still visible." + " Ignoring remove request."); return; } removeStartingWindow(); } } void removeStartingWindow() { synchronized (mWindowMap) { synchronized (mWindowMap) { if (mContainer.startingWindow == null) { if (mContainer.startingWindow == null) { if (mContainer.startingData != null) { if (mContainer.startingData != null) { Loading
services/core/java/com/android/server/wm/AppWindowToken.java +3 −8 Original line number Original line Diff line number Diff line Loading @@ -448,7 +448,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mChildren.get(i).mWinAnimator.hide("immediately hidden"); mChildren.get(i).mWinAnimator.hide("immediately hidden"); } } SurfaceControl.closeTransaction(); SurfaceControl.closeTransaction(); removeStartingWindow(); } } if (!mService.mClosingApps.contains(this) && !mService.mOpeningApps.contains(this)) { if (!mService.mClosingApps.contains(this) && !mService.mOpeningApps.contains(this)) { Loading Loading @@ -526,12 +525,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return super.checkCompleteDeferredRemoval(); return super.checkCompleteDeferredRemoval(); } } private void removeStartingWindow() { if (startingData != null && getController() != null) { getController().removeStartingWindow(); } } void onRemovedFromDisplay() { void onRemovedFromDisplay() { if (mRemovingFromDisplay) { if (mRemovingFromDisplay) { return; return; Loading Loading @@ -559,7 +552,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken: " if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken: " + this + " delayed=" + delayed + " Callers=" + Debug.getCallers(4)); + this + " delayed=" + delayed + " Callers=" + Debug.getCallers(4)); removeStartingWindow(); if (startingData != null && getController() != null) { getController().removeStartingWindow(); } // If this window was animating, then we need to ensure that the app transition notifies // If this window was animating, then we need to ensure that the app transition notifies // that animations have completed in WMS.handleAnimatingStoppedAndTransitionLocked(), so // that animations have completed in WMS.handleAnimatingStoppedAndTransitionLocked(), so Loading