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

Commit 8092a47b authored by Wei Wang's avatar Wei Wang
Browse files

AMS: kill app process if exception thrown from bindApplication

bindApplication would fail with exceptions thrown
e.g. TransactionTooLargeException if the binder transaction is too
large. In this case, AMS should kill the process group instead of keeping
retrying.

Bug: 148588589
Test: boot and launch apps
Change-Id: Ic572c11b7e3612fcfb08896ab9d2a436acf964b7
parent 3fbea91a
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -5144,14 +5144,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;
        }