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

Commit 47a351c9 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

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

am: 3397c88f

* commit '3397c88f':
  Notify app op watchers when audio restrictions change.

Change-Id: I07d531153aeaf01080246980357c8a481ff88e93
parents 5c3ab1b8 3397c88f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);