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

Commit 28d8b8c9 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "Fix race condition when collecting op callback." am: 98844a97

am: 67801185

* commit '67801185':
  Fix race condition when collecting op callback.
parents ec0e46fb 67801185
Loading
Loading
Loading
Loading
+25 −23
Original line number Diff line number Diff line
@@ -512,6 +512,7 @@ public class AppOpsService extends IAppOpsService.Stub {
        String[] uidPackageNames = getPackagesForUid(uid);
        ArrayMap<Callback, ArraySet<String>> callbackSpecs = null;

        synchronized (this) {
            ArrayList<Callback> callbacks = mOpModeWatchers.get(code);
            if (callbacks != null) {
                final int callbackCount = callbacks.size();
@@ -542,6 +543,7 @@ public class AppOpsService extends IAppOpsService.Stub {
                    }
                }
            }
        }

        if (callbackSpecs == null) {
            return;