Merge "Notify app op watchers when audio restrictions change." into nyc-dev

This commit is contained in:
Julia Reynolds
2016-04-06 14:27:34 +00:00
committed by Android (Google) Code Review

View File

@@ -979,6 +979,7 @@ public class AppOpsService extends IAppOpsService.Stub {
usageRestrictions.put(usage, r);
}
}
notifyWatchersOfChange(code);
}
@Override
@@ -2284,6 +2285,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);