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

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

Merge "Cleanup the activity before the task and stack"

parents 9fc3cef1 acebdc84
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -3054,6 +3054,8 @@ final class ActivityStack {
     * representation) and cleaning things up as a result of its hosting
     * processing going away, in which case there is no remaining client-side
     * state to destroy so only the cleanup here is needed.
     *
     * Note: Call before #removeActivityFromHistoryLocked.
     */
    final void cleanUpActivityLocked(ActivityRecord r, boolean cleanServices,
            boolean setState) {
@@ -3465,7 +3467,7 @@ final class ActivityStack {
                if (DEBUG_CLEANUP) Slog.v(
                    TAG, "Record #" + i + " " + r + ": app=" + r.app);
                if (r.app == app) {
                    boolean remove;
                    final boolean remove;
                    if ((!r.haveState && !r.stateNotNeeded) || r.finishing) {
                        // Don't currently have state for the activity, or
                        // it is finishing -- always remove it.
@@ -3499,8 +3501,6 @@ final class ActivityStack {
                                mService.updateUsageStats(r, false);
                            }
                        }
                        removeActivityFromHistoryLocked(r, "appDied");

                    } else {
                        // We have the current state for this activity, so
                        // it can be restarted later when needed.
@@ -3519,8 +3519,10 @@ final class ActivityStack {
                            r.icicle = null;
                        }
                    }

                    cleanUpActivityLocked(r, true, true);
                    if (remove) {
                        removeActivityFromHistoryLocked(r, "appDied");
                    }
                }
            }
        }