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

Commit f1ddb5e0 authored by Robert Carr's avatar Robert Carr Committed by Rob Carr
Browse files

Catch exceptions thrown by pending activity launches.

When we perform pendign activity launches from the handler
thread (as opposed to the a client binder thread), we must
take care exceptions from such will not bring the system
server down.

Bug: 24983901
Change-Id: I0e75f6b51bf6172a8e1b9cccc5fffb9d50c63e30
parent 48234936
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2467,8 +2467,13 @@ public final class ActivityStackSupervisor implements DisplayListener {
    final void doPendingActivityLaunchesLocked(boolean doResume) {
        while (!mPendingActivityLaunches.isEmpty()) {
            PendingActivityLaunch pal = mPendingActivityLaunches.remove(0);

            try {
                startActivityUncheckedLocked(pal.r, pal.sourceRecord, null, null, pal.startFlags,
                                             doResume && mPendingActivityLaunches.isEmpty(), null, null);
            } catch (Exception e) {
                Slog.w(TAG, "Exception during pending activity launch pal=" + pal, e);
            }
        }
    }