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

Commit f415752b authored by Kathy Chen's avatar Kathy Chen Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "[AC] Fix NPE. If the client sends multiple unregister...

Merge "Revert "Revert "[AC] Fix NPE. If the client sends multiple unregister requests at the same time, the client request could be null before the next request is processed.""" into udc-dev
parents 528cd329 b43fbe2a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * System service for managing {@link AmbientContextEvent}s.
@@ -595,7 +596,7 @@ public class AmbientContextManagerService extends

            synchronized (mLock) {
                for (ClientRequest cr : mExistingClientRequests) {
                    if (cr.getPackageName().equals(callingPackage)) {
                    if ((cr != null) && cr.getPackageName().equals(callingPackage)) {
                        AmbientContextManagerPerUserService service =
                                getAmbientContextManagerPerUserServiceForEventTypes(
                                        UserHandle.getCallingUserId(),