Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a78d9a24 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Reset activity's "return to home" flag on relaunch" into klp-dev

parents a6dcf1a2 e12a4a68
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1426,8 +1426,7 @@ public final class ActivityStackSupervisor {
                            if ((launchFlags &
                            if ((launchFlags &
                                    (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
                                    (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
                                    == (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME)) {
                                    == (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME)) {
                                // Caller wants to appear on home activity, so before starting
                                // Caller wants to appear on home activity.
                                // their own activity we will bring home to the front.
                                r.mLaunchHomeTaskNext = true;
                                r.mLaunchHomeTaskNext = true;
                            }
                            }
                            targetStack.moveTaskToFrontLocked(intentActivity.task, r, options);
                            targetStack.moveTaskToFrontLocked(intentActivity.task, r, options);
@@ -1541,6 +1540,8 @@ public final class ActivityStackSupervisor {
                        // don't use that intent!)  And for paranoia, make
                        // don't use that intent!)  And for paranoia, make
                        // sure we have correctly resumed the top activity.
                        // sure we have correctly resumed the top activity.
                        if (doResume) {
                        if (doResume) {
                            // Reset flag so it gets correctly reevaluated.
                            intentActivity.mLaunchHomeTaskNext = false;
                            setLaunchHomeTaskNextFlag(sourceRecord, intentActivity, targetStack);
                            setLaunchHomeTaskNextFlag(sourceRecord, intentActivity, targetStack);
                            targetStack.resumeTopActivityLocked(null, options);
                            targetStack.resumeTopActivityLocked(null, options);
                        } else {
                        } else {