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

Commit 1f1d3725 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "bringDownServiceLocked() shouldn't complain when mServicesByName..." into oc-dev

parents 060f0f03 1b9dfda1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2151,7 +2151,10 @@ public final class ActiveServices {

        final ServiceMap smap = getServiceMapLocked(r.userId);
        ServiceRecord found = smap.mServicesByName.remove(r.name);
        if (found != r) {

        // Note when this method is called by bringUpServiceLocked(), the service is not found
        // in mServicesByName and found will be null.
        if (found != null && found != r) {
            // This is not actually the service we think is running...  this should not happen,
            // but if it does, fail hard.
            smap.mServicesByName.put(r.name, found);