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

Commit 3846d3a4 authored by Olawale Ogunwale's avatar Olawale Ogunwale Committed by Android Git Automerger
Browse files

am 6d856bfb: am cf7d2d95: Merge "[ActivityManager] Avoid orphan ContentProviderRecord."

* commit '6d856bfb':
  [ActivityManager] Avoid orphan ContentProviderRecord.
parents fddbcd85 6d856bfb
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -5817,17 +5817,20 @@ public final class ActivityManagerService extends ActivityManagerNative
            if (app.isolated) {
                mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
            }
            app.kill(reason, true);
            handleAppDiedLocked(app, true, allowRestart);
            removeLruProcessLocked(app);
            boolean willRestart = false;
            if (app.persistent && !app.isolated) {
                if (!callerWillRestart) {
                    addAppLocked(app.info, false, null /* ABI override */);
                    willRestart = true;
                } else {
                    needRestart = true;
                }
            }
            app.kill(reason, true);
            handleAppDiedLocked(app, willRestart, allowRestart);
            if (willRestart) {
                removeLruProcessLocked(app);
                addAppLocked(app.info, false, null /* ABI override */);
            }
        } else {
            mRemovedProcesses.add(app);
        }