OSDN Git Service

Notify app op watchers when audio restrictions change.
authorJulia Reynolds <juliacr@google.com>
Tue, 5 Apr 2016 20:01:49 +0000 (16:01 -0400)
committerJulia Reynolds <juliacr@google.com>
Tue, 5 Apr 2016 20:01:49 +0000 (16:01 -0400)
Bug: 27702159
Change-Id: I09c70708b8a32c0bf9a21a3c256100796167780e

services/core/java/com/android/server/AppOpsService.java

index c38a89e..b5a72fa 100644 (file)
@@ -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<Callback> clonedCallbacks;
         synchronized (this) {
             ArrayList<Callback> callbacks = mOpModeWatchers.get(code);