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

Commit 8bf0aa9b authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #5636525: ANR observed in setup wizard after changing language

We could sometimes allow a process to be killed while still waiting for
an activity in it to finish stopping.

Change-Id: Ibf89665c4ad6da6be22de04a82b19ef778a7fda0
parent 672342c3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2720,6 +2720,10 @@ public final class ActivityManagerService extends ActivityManagerNative
                    }
                    if (!r.finishing) {
                        Slog.w(TAG, "Force removing " + r + ": app died, no saved state");
                        EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
                                System.identityHashCode(r),
                                r.task.taskId, r.shortComponentName,
                                "proc died without state saved");
                    }
                    r.makeFinishing();
                    mMainStack.mHistory.remove(i);
@@ -13596,6 +13600,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                        adj = ProcessList.PERCEPTIBLE_APP_ADJ;
                        app.adjType = "stopping";
                    }
                    app.hidden = false;
                    app.foregroundActivities = true;
                }
            }