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

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

Merge "When an app dies launch home conditionally."

parents 3af16b22 37f748db
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3298,13 +3298,16 @@ final class ActivityStack {
        if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
            mLastPausedActivity = null;
        }
        final ActivityRecord top = topRunningActivityLocked(null);
        final boolean launchHomeTaskNext =
                top != null && top.app == app && top.mLaunchHomeTaskNext;

        // Remove this application's activities from active lists.
        boolean hasVisibleActivities = removeHistoryRecordsForAppLocked(app);

        if (!restarting) {
            ActivityStack stack = mStackSupervisor.getFocusedStack();
            if (stack == null) {
            if (stack == null || launchHomeTaskNext) {
                mStackSupervisor.resumeHomeActivity(null);
            } else if (!mStackSupervisor.resumeTopActivitiesLocked(stack, null, null)) {
                // If there was nothing to resume, and we are not already