Merge "Use the pre-reset userLeaving for canPipOnFinish" into tm-qpr-dev

This commit is contained in:
Evan Rosky
2022-05-12 00:10:00 +00:00
committed by Android (Google) Code Review

View File

@@ -1674,6 +1674,7 @@ class ActivityStarter {
private @Nullable Task handleStartResult(@NonNull ActivityRecord started, private @Nullable Task handleStartResult(@NonNull ActivityRecord started,
ActivityOptions options, int result, Transition newTransition, ActivityOptions options, int result, Transition newTransition,
RemoteTransition remoteTransition) { RemoteTransition remoteTransition) {
final boolean userLeaving = mSupervisor.mUserLeaving;
mSupervisor.mUserLeaving = false; mSupervisor.mUserLeaving = false;
final Task currentRootTask = started.getRootTask(); final Task currentRootTask = started.getRootTask();
final Task startedActivityRootTask = final Task startedActivityRootTask =
@@ -1747,7 +1748,7 @@ class ActivityStarter {
// until after we launched to identify the relevant activity. // until after we launched to identify the relevant activity.
transitionController.setTransientLaunch(mLastStartActivityRecord, mPriorAboveTask); transitionController.setTransientLaunch(mLastStartActivityRecord, mPriorAboveTask);
} }
if (!mSupervisor.mUserLeaving) { if (!userLeaving) {
// no-user-leaving implies not entering PiP. // no-user-leaving implies not entering PiP.
transitionController.setCanPipOnFinish(false /* canPipOnFinish */); transitionController.setCanPipOnFinish(false /* canPipOnFinish */);
} }