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

Commit 06780834 authored by Wei Wang's avatar Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "AMS: kill app process if exception thrown from bindApplication"

parents 714024c5 8092a47b
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -5143,14 +5143,12 @@ public class ActivityManagerService extends IActivityManager.Stub
            checkTime(startTime, "attachApplicationLocked: after updateLruProcessLocked");
            app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis();
        } catch (Exception e) {
            // todo: Yikes!  What should we do?  For now we will try to
            // start another process, but that could easily get us in
            // an infinite loop of restarting processes...
            // We need kill the process group here. (b/148588589)
            Slog.wtf(TAG, "Exception thrown during bind of " + app, e);
            app.resetPackageList(mProcessStats);
            app.unlinkDeathRecipient();
            mProcessList.startProcessLocked(app, new HostingRecord("bind-fail", processName));
            app.kill("error during bind", ApplicationExitInfo.REASON_INITIALIZATION_FAILURE, true);
            handleAppDiedLocked(app, false, true);
            return false;
        }