Merge "Run transitions when starting into paused and use starting-windows for split" into rvc-dev

This commit is contained in:
Evan Rosky
2020-05-05 17:16:49 +00:00
committed by Android (Google) Code Review
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_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.TRANSIT_ACTIVITY_CLOSE; 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_CLOSE;
import static android.view.WindowManager.TRANSIT_TASK_OPEN_BEHIND; import static android.view.WindowManager.TRANSIT_TASK_OPEN_BEHIND;
import static android.view.WindowManager.TRANSIT_UNSET; 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, private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning,
boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents, boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents,
ActivityManager.TaskSnapshot snapshot) { ActivityManager.TaskSnapshot snapshot) {
if (getDisplayContent().mAppTransition.getAppTransition() if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
== 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; return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
} else if (taskSwitch && allowTaskSnapshot) { } else if (taskSwitch && allowTaskSnapshot) {
if (snapshotOrientationSameAsTask(snapshot) || (snapshot != null && fromRecents)) { 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.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.TYPE_VIRTUAL; 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.PAUSED;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING; 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, if (DEBUG_STATES) Slog.v(TAG_STATES,
"Moving to PAUSED: " + r + " (starting in paused state)"); "Moving to PAUSED: " + r + " (starting in paused state)");
r.setState(PAUSED, "realStartActivityLocked"); r.setState(PAUSED, "realStartActivityLocked");
mRootWindowContainer.executeAppTransitionForAllDisplay();
} }
// Perform OOM scoring after the activity state is set, so the process can be updated with // Perform OOM scoring after the activity state is set, so the process can be updated with
// the latest state. // 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 // not run into issues where we still need to draw the task in recents but the
// docked stack is already created. // docked stack is already created.
deferUpdateRecentsHomeStackBounds(); 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. // TODO(task-hierarchy): Remove when tiles are in hierarchy.
// Unset launching windowing mode to prevent creating split-screen-primary stack // Unset launching windowing mode to prevent creating split-screen-primary stack
// in RWC#anyTaskForId() below. // in RWC#anyTaskForId() below.