Loading core/java/android/app/ActivityThread.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -4771,6 +4771,7 @@ public final class ActivityThread extends ClientTransactionHandler // frame. // frame. final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); transaction.hide(startingWindowLeash); transaction.hide(startingWindowLeash); startingWindowLeash.release(); view.syncTransferSurfaceOnDraw(); view.syncTransferSurfaceOnDraw(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java +9 −5 Original line number Original line Diff line number Diff line Loading @@ -368,8 +368,12 @@ class SplashscreenWindowCreator extends AbsSplashWindowCreator { mStartingWindowRecordManager.addRecord(taskId, tView); mStartingWindowRecordManager.addRecord(taskId, tView); } } private void removeWindowInner(@NonNull View decorView, boolean hideView) { private void removeWindowInner(@NonNull View decorView, StartingWindowRemovalInfo info, boolean hideView) { requestTopUi(false); requestTopUi(false); if (info.windowAnimationLeash != null && info.windowAnimationLeash.isValid()) { info.windowAnimationLeash.release(); } if (decorView.getParent() == null) { if (decorView.getParent() == null) { Slog.w(TAG, "This root view has no parent, never been added to a ViewRootImpl?"); Slog.w(TAG, "This root view has no parent, never been added to a ViewRootImpl?"); return; return; Loading Loading @@ -452,22 +456,22 @@ class SplashscreenWindowCreator extends AbsSplashWindowCreator { if (mSplashView == null) { if (mSplashView == null) { // shouldn't happen, the app window may be drawn earlier than starting window? // shouldn't happen, the app window may be drawn earlier than starting window? Slog.e(TAG, "Found empty splash screen, remove!"); Slog.e(TAG, "Found empty splash screen, remove!"); removeWindowInner(mRootView, false); removeWindowInner(mRootView, info, false); return true; return true; } } if (immediately if (immediately || mSuggestType == STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN) { || mSuggestType == STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN) { removeWindowInner(mRootView, false); removeWindowInner(mRootView, info, false); } else { } else { if (info.playRevealAnimation) { if (info.playRevealAnimation) { mSplashscreenContentDrawer.applyExitAnimation(mSplashView, mSplashscreenContentDrawer.applyExitAnimation(mSplashView, info.windowAnimationLeash, info.mainFrame, info.windowAnimationLeash, info.mainFrame, () -> removeWindowInner(mRootView, true), () -> removeWindowInner(mRootView, info, true), mCreateTime, info.roundedCornerRadius); mCreateTime, info.roundedCornerRadius); } else { } else { // the SplashScreenView has been copied to client, hide the view to skip // the SplashScreenView has been copied to client, hide the view to skip // default exit animation // default exit animation removeWindowInner(mRootView, true); removeWindowInner(mRootView, info, true); } } } } return true; return true; Loading Loading
core/java/android/app/ActivityThread.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -4771,6 +4771,7 @@ public final class ActivityThread extends ClientTransactionHandler // frame. // frame. final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); transaction.hide(startingWindowLeash); transaction.hide(startingWindowLeash); startingWindowLeash.release(); view.syncTransferSurfaceOnDraw(); view.syncTransferSurfaceOnDraw(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java +9 −5 Original line number Original line Diff line number Diff line Loading @@ -368,8 +368,12 @@ class SplashscreenWindowCreator extends AbsSplashWindowCreator { mStartingWindowRecordManager.addRecord(taskId, tView); mStartingWindowRecordManager.addRecord(taskId, tView); } } private void removeWindowInner(@NonNull View decorView, boolean hideView) { private void removeWindowInner(@NonNull View decorView, StartingWindowRemovalInfo info, boolean hideView) { requestTopUi(false); requestTopUi(false); if (info.windowAnimationLeash != null && info.windowAnimationLeash.isValid()) { info.windowAnimationLeash.release(); } if (decorView.getParent() == null) { if (decorView.getParent() == null) { Slog.w(TAG, "This root view has no parent, never been added to a ViewRootImpl?"); Slog.w(TAG, "This root view has no parent, never been added to a ViewRootImpl?"); return; return; Loading Loading @@ -452,22 +456,22 @@ class SplashscreenWindowCreator extends AbsSplashWindowCreator { if (mSplashView == null) { if (mSplashView == null) { // shouldn't happen, the app window may be drawn earlier than starting window? // shouldn't happen, the app window may be drawn earlier than starting window? Slog.e(TAG, "Found empty splash screen, remove!"); Slog.e(TAG, "Found empty splash screen, remove!"); removeWindowInner(mRootView, false); removeWindowInner(mRootView, info, false); return true; return true; } } if (immediately if (immediately || mSuggestType == STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN) { || mSuggestType == STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN) { removeWindowInner(mRootView, false); removeWindowInner(mRootView, info, false); } else { } else { if (info.playRevealAnimation) { if (info.playRevealAnimation) { mSplashscreenContentDrawer.applyExitAnimation(mSplashView, mSplashscreenContentDrawer.applyExitAnimation(mSplashView, info.windowAnimationLeash, info.mainFrame, info.windowAnimationLeash, info.mainFrame, () -> removeWindowInner(mRootView, true), () -> removeWindowInner(mRootView, info, true), mCreateTime, info.roundedCornerRadius); mCreateTime, info.roundedCornerRadius); } else { } else { // the SplashScreenView has been copied to client, hide the view to skip // the SplashScreenView has been copied to client, hide the view to skip // default exit animation // default exit animation removeWindowInner(mRootView, true); removeWindowInner(mRootView, info, true); } } } } return true; return true; Loading