Merge "Run transitions when starting into paused and use starting-windows for split" into rvc-dev am: be427a2445 am: bbf694e99c am: 8511f226e8

Change-Id: I3b9fceb28cd93265d1782c16c2faa63fca57010f
This commit is contained in:
Evan Rosky
2020-05-05 18:08:25 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 11 deletions

View File

@@ -104,7 +104,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.TRANSIT_ACTIVITY_CLOSE;
import static android.view.WindowManager.TRANSIT_DOCK_TASK_FROM_RECENTS;
import static android.view.WindowManager.TRANSIT_TASK_CLOSE;
import static android.view.WindowManager.TRANSIT_TASK_OPEN_BEHIND;
import static android.view.WindowManager.TRANSIT_UNSET;
@@ -1892,13 +1891,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning,
boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents,
ActivityManager.TaskSnapshot snapshot) {
if (getDisplayContent().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)) {
if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
} else if (taskSwitch && allowTaskSnapshot) {
if (snapshotOrientationSameAsTask(snapshot) || (snapshot != null && fromRecents)) {

View File

@@ -45,7 +45,6 @@ import static android.os.Process.SYSTEM_UID;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.TYPE_VIRTUAL;
import static android.view.WindowManager.TRANSIT_DOCK_TASK_FROM_RECENTS;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSED;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING;
@@ -915,6 +914,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
if (DEBUG_STATES) Slog.v(TAG_STATES,
"Moving to PAUSED: " + r + " (starting in paused state)");
r.setState(PAUSED, "realStartActivityLocked");
mRootWindowContainer.executeAppTransitionForAllDisplay();
}
// Perform OOM scoring after the activity state is set, so the process can be updated with
// the latest state.
@@ -2513,8 +2513,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
// not run into issues where we still need to draw the task in recents but the
// docked stack is already created.
deferUpdateRecentsHomeStackBounds();
// TODO(multi-display): currently recents animation only support default display.
mWindowManager.prepareAppTransition(TRANSIT_DOCK_TASK_FROM_RECENTS, false);
// TODO(task-hierarchy): Remove when tiles are in hierarchy.
// Unset launching windowing mode to prevent creating split-screen-primary stack
// in RWC#anyTaskForId() below.