Revert "Revert "Only invoke for callbacks watching the given pac..."
Revert submission 22262229-revert-21960657-TEBKYKOPLW Reason for revert: Fixed parent CL Reverted changes: /q/submissionid:22262229-revert-21960657-TEBKYKOPLW Change-Id: Id49f7464045c01cb6bbbfcb852adaaf7eb64e10f
This commit is contained in:
@@ -1857,6 +1857,10 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
for (int i = 0; i < callbackCount; i++) {
|
||||
OnOpModeChangedListener callback = callbacks.valueAt(i);
|
||||
|
||||
if (!callback.isWatchingUid(uid)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (onlyForeground && (callback.getFlags()
|
||||
& WATCH_FOREGROUND_CHANGES) == 0) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user