Merge "Request starting window first when moving task with shell transition" into tm-qpr-dev am: 15456ce9e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18910310 Change-Id: If0ad75a2942fc368bfdf0d3690250b2c3ef89147 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2179,14 +2179,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
|||||||
: null;
|
: null;
|
||||||
mTaskSupervisor.findTaskToMoveToFront(task, flags, realOptions, "moveTaskToFront",
|
mTaskSupervisor.findTaskToMoveToFront(task, flags, realOptions, "moveTaskToFront",
|
||||||
false /* forceNonResizable */);
|
false /* forceNonResizable */);
|
||||||
|
|
||||||
final ActivityRecord topActivity = task.getTopNonFinishingActivity();
|
|
||||||
if (topActivity != null) {
|
|
||||||
|
|
||||||
// We are reshowing a task, use a starting window to hide the initial draw delay
|
|
||||||
// so the transition can start earlier.
|
|
||||||
topActivity.showStartingWindow(true /* taskSwitch */);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1434,10 +1434,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
|
|||||||
mUserLeaving = true;
|
mUserLeaving = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
task.mTransitionController.requestTransitionIfNeeded(TRANSIT_TO_FRONT,
|
final Transition newTransition = task.mTransitionController.isShellTransitionsEnabled()
|
||||||
0 /* flags */, task, task /* readyGroupRef */,
|
? task.mTransitionController.isCollecting() ? null
|
||||||
options != null ? options.getRemoteTransition() : null,
|
: task.mTransitionController.createTransition(TRANSIT_TO_FRONT) : null;
|
||||||
null /* displayChange */);
|
task.mTransitionController.collect(task);
|
||||||
reason = reason + " findTaskToMoveToFront";
|
reason = reason + " findTaskToMoveToFront";
|
||||||
boolean reparented = false;
|
boolean reparented = false;
|
||||||
if (task.isResizeable() && canUseActivityOptionsLaunchBounds(options)) {
|
if (task.isResizeable() && canUseActivityOptionsLaunchBounds(options)) {
|
||||||
@@ -1480,6 +1480,17 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
|
|||||||
handleNonResizableTaskIfNeeded(task, WINDOWING_MODE_UNDEFINED,
|
handleNonResizableTaskIfNeeded(task, WINDOWING_MODE_UNDEFINED,
|
||||||
mRootWindowContainer.getDefaultTaskDisplayArea(), currentRootTask,
|
mRootWindowContainer.getDefaultTaskDisplayArea(), currentRootTask,
|
||||||
forceNonResizeable);
|
forceNonResizeable);
|
||||||
|
if (r != null) {
|
||||||
|
// Use a starting window to reduce the transition latency for reshowing the task.
|
||||||
|
// Note that with shell transition, this should be executed before requesting
|
||||||
|
// transition to avoid delaying the starting window.
|
||||||
|
r.showStartingWindow(true /* taskSwitch */);
|
||||||
|
}
|
||||||
|
if (newTransition != null) {
|
||||||
|
task.mTransitionController.requestStartTransition(newTransition, task,
|
||||||
|
options != null ? options.getRemoteTransition() : null,
|
||||||
|
null /* displayChange */);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
mUserLeaving = false;
|
mUserLeaving = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user