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

Commit bfac468c authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Throw caught DeadObjectException when trying to create a service.

We don't want to continue trying to start the service if the service
appliction is dead. This will lead to an NPE later on since we have
set ServiceRecord.app to null in the finally block.

Bug: 5227987
Change-Id: I3ee5111f4a20d9455fedbf41ac54d41c43aa8d76
parent 0c43e55d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1519,6 +1519,7 @@ public final class ActiveServices {
        } catch (DeadObjectException e) {
            Slog.w(TAG, "Application dead when creating service " + r);
            mAm.appDiedLocked(app);
            throw e;
        } finally {
            if (!created) {
                // Keep the executeNesting count accurate.
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ import static com.android.server.am.ActivityManagerDebugConfig.*;
 * foreground priority, and one for normal (background-priority) broadcasts.
 */
public final class BroadcastQueue {
    private static final String TAG = TAG_WITH_CLASS_NAME ? "BroadcastQueue" : TAG_AM;
    private static final String TAG = "BroadcastQueue";
    private static final String TAG_MU = TAG + POSTFIX_MU;
    private static final String TAG_BROADCAST = TAG + POSTFIX_BROADCAST;