Loading services/core/java/com/android/server/am/RecentsAnimation.java +80 −69 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { void startRecentsActivity(Intent intent, IRecentsAnimationRunner recentsAnimationRunner, ComponentName recentsComponent, int recentsUid) { mWindowManager.deferSurfaceLayout(); try { // Cancel the previous recents animation if necessary mWindowManager.cancelRecentsAnimation(); Loading @@ -82,7 +83,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { opts.setAvoidMoveToFront(); intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION); mActivityStartController.obtainStarter(intent, "startRecentsActivity_noHomeActivity") mActivityStartController .obtainStarter(intent, "startRecentsActivity_noHomeActivity") .setCallingUid(recentsUid) .setCallingPackage(recentsComponent.getPackageName()) .setActivityOptions(SafeActivityOptions.fromBundle(opts.toBundle())) Loading Loading @@ -111,14 +113,18 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // Fetch all the surface controls and pass them to the client to get the animation // started mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); // If we updated the launch-behind state, update the visibility of the activities after we // fetch the visible tasks to be controlled by the animation // If we updated the launch-behind state, update the visibility of the activities after // we fetch the visible tasks to be controlled by the animation mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, PRESERVE_WINDOWS); // Post a timeout for the animation mHandler.postDelayed(mCancelAnimationRunnable, RECENTS_ANIMATION_TIMEOUT); } finally { mWindowManager.continueSurfaceLayout(); } } @Override Loading @@ -128,6 +134,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { if (mWindowManager.getRecentsAnimationController() == null) return; mWindowManager.inSurfaceTransaction(() -> { mWindowManager.deferSurfaceLayout(); try { mWindowManager.cleanupRecentsAnimation(); // Move the home stack to the front Loading Loading @@ -157,6 +165,9 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // No reason to wait for the pausing activity in this case, as the hiding of // surfaces needs to be done immediately. mWindowManager.executeAppTransition(); } finally { mWindowManager.continueSurfaceLayout(); } }); } } Loading Loading
services/core/java/com/android/server/am/RecentsAnimation.java +80 −69 Original line number Diff line number Diff line Loading @@ -70,7 +70,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { void startRecentsActivity(Intent intent, IRecentsAnimationRunner recentsAnimationRunner, ComponentName recentsComponent, int recentsUid) { mWindowManager.deferSurfaceLayout(); try { // Cancel the previous recents animation if necessary mWindowManager.cancelRecentsAnimation(); Loading @@ -82,7 +83,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { opts.setAvoidMoveToFront(); intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION); mActivityStartController.obtainStarter(intent, "startRecentsActivity_noHomeActivity") mActivityStartController .obtainStarter(intent, "startRecentsActivity_noHomeActivity") .setCallingUid(recentsUid) .setCallingPackage(recentsComponent.getPackageName()) .setActivityOptions(SafeActivityOptions.fromBundle(opts.toBundle())) Loading Loading @@ -111,14 +113,18 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // Fetch all the surface controls and pass them to the client to get the animation // started mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); // If we updated the launch-behind state, update the visibility of the activities after we // fetch the visible tasks to be controlled by the animation // If we updated the launch-behind state, update the visibility of the activities after // we fetch the visible tasks to be controlled by the animation mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, PRESERVE_WINDOWS); // Post a timeout for the animation mHandler.postDelayed(mCancelAnimationRunnable, RECENTS_ANIMATION_TIMEOUT); } finally { mWindowManager.continueSurfaceLayout(); } } @Override Loading @@ -128,6 +134,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks { if (mWindowManager.getRecentsAnimationController() == null) return; mWindowManager.inSurfaceTransaction(() -> { mWindowManager.deferSurfaceLayout(); try { mWindowManager.cleanupRecentsAnimation(); // Move the home stack to the front Loading Loading @@ -157,6 +165,9 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // No reason to wait for the pausing activity in this case, as the hiding of // surfaces needs to be done immediately. mWindowManager.executeAppTransition(); } finally { mWindowManager.continueSurfaceLayout(); } }); } } Loading