Loading services/core/java/com/android/server/notification/ConditionProviders.java +7 −5 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public class ConditionProviders extends ManagedServices { public void ensureRecordExists(ComponentName component, Uri conditionId, IConditionProvider provider) { synchronized (mMutex) { // constructed by convention, make sure the record exists... final ConditionRecord r = getRecordLocked(conditionId, component, true /*create*/); if (r.info == null) { Loading @@ -286,6 +287,7 @@ public class ConditionProviders extends ManagedServices { r.info = checkServiceTokenLocked(provider); } } } public boolean subscribeIfNecessary(ComponentName component, Uri conditionId) { synchronized (mMutex) { Loading services/core/java/com/android/server/notification/ManagedServices.java +19 −13 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ abstract public class ManagedServices { } pw.println(" Live " + getCaption() + "s (" + mServices.size() + "):"); synchronized (mMutex) { for (ManagedServiceInfo info : mServices) { if (filter != null && !filter.matches(info.component)) continue; pw.println(" " + info.component Loading @@ -223,6 +224,7 @@ abstract public class ManagedServices { + (info.isSystem ? " SYSTEM" : "") + (info.isGuest(this) ? " GUEST" : "")); } } pw.println(" Snoozed " + getCaption() + "s (" + mSnoozingForCurrentProfiles.size() + "):"); Loading Loading @@ -260,10 +262,12 @@ abstract public class ManagedServices { cmpt.writeToProto(proto, ManagedServicesProto.ENABLED); } synchronized (mMutex) { for (ManagedServiceInfo info : mServices) { if (filter != null && !filter.matches(info.component)) continue; info.writeToProto(proto, ManagedServicesProto.LIVE_SERVICES, this); } } for (ComponentName name : mSnoozingForCurrentProfiles) { name.writeToProto(proto, ManagedServicesProto.SNOOZED); Loading Loading @@ -631,12 +635,14 @@ abstract public class ManagedServices { public boolean isSameUser(IInterface service, int userId) { checkNotNull(service); synchronized (mMutex) { ManagedServiceInfo info = getServiceFromTokenLocked(service); if (info != null) { return info.isSameUser(userId); } return false; } } public void unregisterService(IInterface service, int userid) { checkNotNull(service); Loading Loading
services/core/java/com/android/server/notification/ConditionProviders.java +7 −5 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public class ConditionProviders extends ManagedServices { public void ensureRecordExists(ComponentName component, Uri conditionId, IConditionProvider provider) { synchronized (mMutex) { // constructed by convention, make sure the record exists... final ConditionRecord r = getRecordLocked(conditionId, component, true /*create*/); if (r.info == null) { Loading @@ -286,6 +287,7 @@ public class ConditionProviders extends ManagedServices { r.info = checkServiceTokenLocked(provider); } } } public boolean subscribeIfNecessary(ComponentName component, Uri conditionId) { synchronized (mMutex) { Loading
services/core/java/com/android/server/notification/ManagedServices.java +19 −13 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ abstract public class ManagedServices { } pw.println(" Live " + getCaption() + "s (" + mServices.size() + "):"); synchronized (mMutex) { for (ManagedServiceInfo info : mServices) { if (filter != null && !filter.matches(info.component)) continue; pw.println(" " + info.component Loading @@ -223,6 +224,7 @@ abstract public class ManagedServices { + (info.isSystem ? " SYSTEM" : "") + (info.isGuest(this) ? " GUEST" : "")); } } pw.println(" Snoozed " + getCaption() + "s (" + mSnoozingForCurrentProfiles.size() + "):"); Loading Loading @@ -260,10 +262,12 @@ abstract public class ManagedServices { cmpt.writeToProto(proto, ManagedServicesProto.ENABLED); } synchronized (mMutex) { for (ManagedServiceInfo info : mServices) { if (filter != null && !filter.matches(info.component)) continue; info.writeToProto(proto, ManagedServicesProto.LIVE_SERVICES, this); } } for (ComponentName name : mSnoozingForCurrentProfiles) { name.writeToProto(proto, ManagedServicesProto.SNOOZED); Loading Loading @@ -631,12 +635,14 @@ abstract public class ManagedServices { public boolean isSameUser(IInterface service, int userId) { checkNotNull(service); synchronized (mMutex) { ManagedServiceInfo info = getServiceFromTokenLocked(service); if (info != null) { return info.isSameUser(userId); } return false; } } public void unregisterService(IInterface service, int userid) { checkNotNull(service); Loading