Loading services/core/java/com/android/server/wm/ActivityRecord.java +3 −1 Original line number Diff line number Diff line Loading @@ -2677,7 +2677,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A private boolean transferSplashScreenIfNeeded() { if (finishing || !mHandleExitSplashScreen || mStartingSurface == null || mStartingWindow == null || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH) { || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH // skip copy splash screen to client if it was resized || (mStartingData != null && mStartingData.mResizedFromTransfer)) { return false; } if (isTransferringSplashScreen()) { Loading services/core/java/com/android/server/wm/StartingData.java +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ public abstract class StartingData { */ Task mAssociatedTask; /** Whether the starting window is resized from transfer across activities. */ boolean mResizedFromTransfer; /** Whether the starting window is drawn. */ boolean mIsDisplayed; Loading services/core/java/com/android/server/wm/WindowState.java +11 −2 Original line number Diff line number Diff line Loading @@ -1935,7 +1935,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } final ActivityRecord atoken = mActivityRecord; if (atoken != null) { return ((!isParentWindowHidden() && atoken.isVisible()) final boolean isVisible = isStartingWindowAssociatedToTask() ? mStartingData.mAssociatedTask.isVisible() : atoken.isVisible(); return ((!isParentWindowHidden() && isVisible) || isAnimationRunningSelfOrParent()); } final WallpaperWindowToken wtoken = mToken.asWallpaperToken(); Loading Loading @@ -2330,6 +2332,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // IME surface association. (e.g. Attach IME surface on the display instead of the // app when the app bounds being letterboxed.) mDisplayContent.updateImeControlTarget(isImeLayeringTarget() /* updateImeParent */); // Fix the starting window to task when Activity has changed. if (mStartingData != null && mStartingData.mAssociatedTask == null && !mTempConfiguration.windowConfiguration.getBounds().equals(getBounds())) { mStartingData.mResizedFromTransfer = true; // Lock the starting window to task, so it won't resize from transfer anymore. mActivityRecord.associateStartingWindowWithTaskIfNeeded(); } } } Loading Loading @@ -3902,7 +3911,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * LetterboxUiController#shouldShowLetterboxUi} for more context. */ boolean areAppWindowBoundsLetterboxed() { return mActivityRecord != null return mActivityRecord != null && !isStartingWindowAssociatedToTask() && (mActivityRecord.areBoundsLetterboxed() || isLetterboxedForDisplayCutout()); } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +3 −1 Original line number Diff line number Diff line Loading @@ -2677,7 +2677,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A private boolean transferSplashScreenIfNeeded() { if (finishing || !mHandleExitSplashScreen || mStartingSurface == null || mStartingWindow == null || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH) { || mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH // skip copy splash screen to client if it was resized || (mStartingData != null && mStartingData.mResizedFromTransfer)) { return false; } if (isTransferringSplashScreen()) { Loading
services/core/java/com/android/server/wm/StartingData.java +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ public abstract class StartingData { */ Task mAssociatedTask; /** Whether the starting window is resized from transfer across activities. */ boolean mResizedFromTransfer; /** Whether the starting window is drawn. */ boolean mIsDisplayed; Loading
services/core/java/com/android/server/wm/WindowState.java +11 −2 Original line number Diff line number Diff line Loading @@ -1935,7 +1935,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } final ActivityRecord atoken = mActivityRecord; if (atoken != null) { return ((!isParentWindowHidden() && atoken.isVisible()) final boolean isVisible = isStartingWindowAssociatedToTask() ? mStartingData.mAssociatedTask.isVisible() : atoken.isVisible(); return ((!isParentWindowHidden() && isVisible) || isAnimationRunningSelfOrParent()); } final WallpaperWindowToken wtoken = mToken.asWallpaperToken(); Loading Loading @@ -2330,6 +2332,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // IME surface association. (e.g. Attach IME surface on the display instead of the // app when the app bounds being letterboxed.) mDisplayContent.updateImeControlTarget(isImeLayeringTarget() /* updateImeParent */); // Fix the starting window to task when Activity has changed. if (mStartingData != null && mStartingData.mAssociatedTask == null && !mTempConfiguration.windowConfiguration.getBounds().equals(getBounds())) { mStartingData.mResizedFromTransfer = true; // Lock the starting window to task, so it won't resize from transfer anymore. mActivityRecord.associateStartingWindowWithTaskIfNeeded(); } } } Loading Loading @@ -3902,7 +3911,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * LetterboxUiController#shouldShowLetterboxUi} for more context. */ boolean areAppWindowBoundsLetterboxed() { return mActivityRecord != null return mActivityRecord != null && !isStartingWindowAssociatedToTask() && (mActivityRecord.areBoundsLetterboxed() || isLetterboxedForDisplayCutout()); } Loading