From bb21c25b3f927eeb1a1e56fa3023093f0d74204c Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 5 Apr 2016 16:01:49 -0400 Subject: [PATCH] Notify app op watchers when audio restrictions change. Bug: 27702159 Change-Id: I09c70708b8a32c0bf9a21a3c256100796167780e --- services/core/java/com/android/server/AppOpsService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java index c38a89e30807e..b5a72fafb0642 100644 --- a/services/core/java/com/android/server/AppOpsService.java +++ b/services/core/java/com/android/server/AppOpsService.java @@ -979,6 +979,7 @@ public class AppOpsService extends IAppOpsService.Stub { usageRestrictions.put(usage, r); } } + notifyWatchersOfChange(code); } @Override @@ -2280,6 +2281,10 @@ public class AppOpsService extends IAppOpsService.Stub { pruneUserRestrictionsForToken(token, userHandle); } + notifyWatchersOfChange(code); + } + + private void notifyWatchersOfChange(int code) { final ArrayList clonedCallbacks; synchronized (this) { ArrayList callbacks = mOpModeWatchers.get(code);