Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +67 −61 Original line number Diff line number Diff line Loading @@ -2364,7 +2364,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } void notifyAppTransitionDone() { continueUpdateBounds(HOME_STACK_ID); continueUpdateBounds(RECENTS_STACK_ID); for (int i = mResizingTasksDuringAnimation.size() - 1; i >= 0; i--) { final int taskId = mResizingTasksDuringAnimation.valueAt(i); final TaskRecord task = Loading Loading @@ -5090,6 +5090,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D + taskId + " can't be launch in the home/recents stack."); } mWindowManager.deferSurfaceLayout(); try { if (launchStackId == DOCKED_STACK_ID) { mWindowManager.setDockedStackCreateState( activityOptions.getDockCreateMode(), null /* initialBounds */); Loading @@ -5097,21 +5099,21 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D // Defer updating the stack in which recents is until the app transition is done, to // not run into issues where we still need to draw the task in recents but the // docked stack is already created. deferUpdateBounds(HOME_STACK_ID); deferUpdateBounds(RECENTS_STACK_ID); mWindowManager.prepareAppTransition(TRANSIT_DOCK_TASK_FROM_RECENTS, false); } task = anyTaskForIdLocked(taskId, MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE, launchStackId); if (task == null) { continueUpdateBounds(HOME_STACK_ID); continueUpdateBounds(RECENTS_STACK_ID); mWindowManager.executeAppTransition(); throw new IllegalArgumentException( "startActivityFromRecentsInner: Task " + taskId + " not found."); } // Since we don't have an actual source record here, we assume that the currently focused // activity was the source. // Since we don't have an actual source record here, we assume that the currently // focused activity was the source. final ActivityStack focusedStack = getFocusedStack(); final ActivityRecord sourceRecord = focusedStack != null ? focusedStack.topActivity() : null; Loading Loading @@ -5142,7 +5144,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.mActivityStarter.postStartActivityProcessing(task.getTopActivity(), ActivityManager.START_TASK_TO_FRONT, sourceRecord != null ? sourceRecord.getTask().getStackId() : INVALID_STACK_ID, sourceRecord != null ? sourceRecord.getTask().getStackId() : INVALID_STACK_ID, sourceRecord, task.getStack()); return ActivityManager.START_TASK_TO_FRONT; } Loading @@ -5157,6 +5160,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D setResizingDuringAnimation(task); } return result; } finally { mWindowManager.continueSurfaceLayout(); } } /** Loading services/core/java/com/android/server/wm/AppWindowContainerController.java +8 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.wm; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static com.android.server.wm.AppTransition.TRANSIT_DOCK_TASK_FROM_RECENTS; import static com.android.server.wm.AppTransition.TRANSIT_UNSET; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS; Loading Loading @@ -581,8 +583,12 @@ public class AppWindowContainerController private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated) { if (newTask || !processRunning || (taskSwitch && !activityCreated)) { if (mService.mAppTransition.getAppTransition() == TRANSIT_DOCK_TASK_FROM_RECENTS) { // TODO(b/34099271): Remove this statement to add back the starting window and figure // out why it causes flickering, the starting window appears over the thumbnail while // the docked from recents transition occurs return STARTING_WINDOW_TYPE_NONE; } else if (newTask || !processRunning || (taskSwitch && !activityCreated)) { return STARTING_WINDOW_TYPE_SPLASH_SCREEN; } else if (taskSwitch && allowTaskSnapshot) { return STARTING_WINDOW_TYPE_SNAPSHOT; Loading Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +67 −61 Original line number Diff line number Diff line Loading @@ -2364,7 +2364,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } void notifyAppTransitionDone() { continueUpdateBounds(HOME_STACK_ID); continueUpdateBounds(RECENTS_STACK_ID); for (int i = mResizingTasksDuringAnimation.size() - 1; i >= 0; i--) { final int taskId = mResizingTasksDuringAnimation.valueAt(i); final TaskRecord task = Loading Loading @@ -5090,6 +5090,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D + taskId + " can't be launch in the home/recents stack."); } mWindowManager.deferSurfaceLayout(); try { if (launchStackId == DOCKED_STACK_ID) { mWindowManager.setDockedStackCreateState( activityOptions.getDockCreateMode(), null /* initialBounds */); Loading @@ -5097,21 +5099,21 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D // Defer updating the stack in which recents is until the app transition is done, to // not run into issues where we still need to draw the task in recents but the // docked stack is already created. deferUpdateBounds(HOME_STACK_ID); deferUpdateBounds(RECENTS_STACK_ID); mWindowManager.prepareAppTransition(TRANSIT_DOCK_TASK_FROM_RECENTS, false); } task = anyTaskForIdLocked(taskId, MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE, launchStackId); if (task == null) { continueUpdateBounds(HOME_STACK_ID); continueUpdateBounds(RECENTS_STACK_ID); mWindowManager.executeAppTransition(); throw new IllegalArgumentException( "startActivityFromRecentsInner: Task " + taskId + " not found."); } // Since we don't have an actual source record here, we assume that the currently focused // activity was the source. // Since we don't have an actual source record here, we assume that the currently // focused activity was the source. final ActivityStack focusedStack = getFocusedStack(); final ActivityRecord sourceRecord = focusedStack != null ? focusedStack.topActivity() : null; Loading Loading @@ -5142,7 +5144,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.mActivityStarter.postStartActivityProcessing(task.getTopActivity(), ActivityManager.START_TASK_TO_FRONT, sourceRecord != null ? sourceRecord.getTask().getStackId() : INVALID_STACK_ID, sourceRecord != null ? sourceRecord.getTask().getStackId() : INVALID_STACK_ID, sourceRecord, task.getStack()); return ActivityManager.START_TASK_TO_FRONT; } Loading @@ -5157,6 +5160,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D setResizingDuringAnimation(task); } return result; } finally { mWindowManager.continueSurfaceLayout(); } } /** Loading
services/core/java/com/android/server/wm/AppWindowContainerController.java +8 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.wm; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static com.android.server.wm.AppTransition.TRANSIT_DOCK_TASK_FROM_RECENTS; import static com.android.server.wm.AppTransition.TRANSIT_UNSET; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS; Loading Loading @@ -581,8 +583,12 @@ public class AppWindowContainerController private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated) { if (newTask || !processRunning || (taskSwitch && !activityCreated)) { if (mService.mAppTransition.getAppTransition() == TRANSIT_DOCK_TASK_FROM_RECENTS) { // TODO(b/34099271): Remove this statement to add back the starting window and figure // out why it causes flickering, the starting window appears over the thumbnail while // the docked from recents transition occurs return STARTING_WINDOW_TYPE_NONE; } else if (newTask || !processRunning || (taskSwitch && !activityCreated)) { return STARTING_WINDOW_TYPE_SPLASH_SCREEN; } else if (taskSwitch && allowTaskSnapshot) { return STARTING_WINDOW_TYPE_SNAPSHOT; Loading