Loading services/core/java/com/android/server/wm/ActivityStackSupervisor.java +0 −1 Original line number Diff line number Diff line Loading @@ -2086,7 +2086,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { final TaskRecord task = r.getTaskRecord(); final ActivityStack stack = task.getStack(); r.mLaunchTaskBehind = false; mRecentTasks.add(task); mService.getTaskChangeNotificationController().notifyTaskStackChanged(); stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); Loading services/core/java/com/android/server/wm/RecentsAnimation.java +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks, "startRecentsActivity"); mWindowManager.initializeRecentsAnimation(mTargetActivityType, recentsAnimationRunner, this, mDefaultDisplay.mDisplayId, mStackSupervisor.mRecentTasks.getRecentTaskIds()); mStackSupervisor.mRecentTasks.getRecentTaskIds(), targetActivity); // 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 Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +8 −11 Original line number Diff line number Diff line Loading @@ -358,7 +358,8 @@ public class RecentsAnimationController implements DeathRecipient { * because it may call cancelAnimation() which needs to properly clean up the controller * in the window manager. */ public void initialize(int targetActivityType, SparseBooleanArray recentTaskIds) { public void initialize(int targetActivityType, SparseBooleanArray recentTaskIds, ActivityRecord targetActivity) { mTargetActivityType = targetActivityType; mDisplayContent.mAppTransition.registerListenerLocked(mAppTransitionListener); Loading Loading @@ -400,17 +401,13 @@ public class RecentsAnimationController implements DeathRecipient { } // Adjust the wallpaper visibility for the showing target activity final ActivityRecord recentsComponentActivity = targetStack.getTopChild().getTopFullscreenActivity(); if (recentsComponentActivity != null) { ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "setHomeApp(%s)", recentsComponentActivity.getName()); mTargetActivityRecord = recentsComponentActivity; if (recentsComponentActivity.windowsCanBeWallpaperTarget()) { "setHomeApp(%s)", targetActivity.getName()); mTargetActivityRecord = targetActivity; if (targetActivity.windowsCanBeWallpaperTarget()) { mDisplayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER; mDisplayContent.setLayoutNeeded(); } } // Save the minimized home height final TaskStack dockedStack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -2652,11 +2652,11 @@ public class WindowManagerService extends IWindowManager.Stub void initializeRecentsAnimation(int targetActivityType, IRecentsAnimationRunner recentsAnimationRunner, RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId, SparseBooleanArray recentTaskIds) { SparseBooleanArray recentTaskIds, ActivityRecord targetActivity) { mRecentsAnimationController = new RecentsAnimationController(this, recentsAnimationRunner, callbacks, displayId); mRoot.getDisplayContent(displayId).mAppTransition.updateBooster(); mRecentsAnimationController.initialize(targetActivityType, recentTaskIds); mRecentsAnimationController.initialize(targetActivityType, recentTaskIds, targetActivity); } @VisibleForTesting Loading services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { hiddenActivity.setHidden(true); mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); // Ensure that we are animating the target activity as well assertTrue(mController.isAnimatingTask(homeActivity.getTask())); Loading Loading @@ -181,7 +181,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeAppWindow); mController.startAnimation(); // Ensure that we are animating the app and wallpaper target Loading Loading @@ -210,7 +210,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); mController.startAnimation(); // Cancel the animation and ensure the controller is still running Loading Loading @@ -242,7 +242,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { doReturn(true).when(mDisplayContent.mWallpaperController).isWallpaperVisible(); // Start and finish the animation mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); mController.startAnimation(); // Reset at this point since we may remove adapters that couldn't be created reset(mController); Loading Loading
services/core/java/com/android/server/wm/ActivityStackSupervisor.java +0 −1 Original line number Diff line number Diff line Loading @@ -2086,7 +2086,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks { final TaskRecord task = r.getTaskRecord(); final ActivityStack stack = task.getStack(); r.mLaunchTaskBehind = false; mRecentTasks.add(task); mService.getTaskChangeNotificationController().notifyTaskStackChanged(); stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); Loading
services/core/java/com/android/server/wm/RecentsAnimation.java +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks, "startRecentsActivity"); mWindowManager.initializeRecentsAnimation(mTargetActivityType, recentsAnimationRunner, this, mDefaultDisplay.mDisplayId, mStackSupervisor.mRecentTasks.getRecentTaskIds()); mStackSupervisor.mRecentTasks.getRecentTaskIds(), targetActivity); // 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 Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +8 −11 Original line number Diff line number Diff line Loading @@ -358,7 +358,8 @@ public class RecentsAnimationController implements DeathRecipient { * because it may call cancelAnimation() which needs to properly clean up the controller * in the window manager. */ public void initialize(int targetActivityType, SparseBooleanArray recentTaskIds) { public void initialize(int targetActivityType, SparseBooleanArray recentTaskIds, ActivityRecord targetActivity) { mTargetActivityType = targetActivityType; mDisplayContent.mAppTransition.registerListenerLocked(mAppTransitionListener); Loading Loading @@ -400,17 +401,13 @@ public class RecentsAnimationController implements DeathRecipient { } // Adjust the wallpaper visibility for the showing target activity final ActivityRecord recentsComponentActivity = targetStack.getTopChild().getTopFullscreenActivity(); if (recentsComponentActivity != null) { ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "setHomeApp(%s)", recentsComponentActivity.getName()); mTargetActivityRecord = recentsComponentActivity; if (recentsComponentActivity.windowsCanBeWallpaperTarget()) { "setHomeApp(%s)", targetActivity.getName()); mTargetActivityRecord = targetActivity; if (targetActivity.windowsCanBeWallpaperTarget()) { mDisplayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER; mDisplayContent.setLayoutNeeded(); } } // Save the minimized home height final TaskStack dockedStack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -2652,11 +2652,11 @@ public class WindowManagerService extends IWindowManager.Stub void initializeRecentsAnimation(int targetActivityType, IRecentsAnimationRunner recentsAnimationRunner, RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId, SparseBooleanArray recentTaskIds) { SparseBooleanArray recentTaskIds, ActivityRecord targetActivity) { mRecentsAnimationController = new RecentsAnimationController(this, recentsAnimationRunner, callbacks, displayId); mRoot.getDisplayContent(displayId).mAppTransition.updateBooster(); mRecentsAnimationController.initialize(targetActivityType, recentTaskIds); mRecentsAnimationController.initialize(targetActivityType, recentTaskIds, targetActivity); } @VisibleForTesting Loading
services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { hiddenActivity.setHidden(true); mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); // Ensure that we are animating the target activity as well assertTrue(mController.isAnimatingTask(homeActivity.getTask())); Loading Loading @@ -181,7 +181,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeAppWindow); mController.startAnimation(); // Ensure that we are animating the app and wallpaper target Loading Loading @@ -210,7 +210,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { mDisplayContent.getConfiguration().windowConfiguration.setRotation( mDisplayContent.getRotation()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); mController.startAnimation(); // Cancel the animation and ensure the controller is still running Loading Loading @@ -242,7 +242,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase { doReturn(true).when(mDisplayContent.mWallpaperController).isWallpaperVisible(); // Start and finish the animation mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray()); mController.initialize(ACTIVITY_TYPE_HOME, new SparseBooleanArray(), homeActivity); mController.startAnimation(); // Reset at this point since we may remove adapters that couldn't be created reset(mController); Loading