Correctly log op state if ops restriction is set
If a restiction on the ops is set, we only want to log the requested ops. Fixes: 143488492 Test: WellbeingTest#testDigitalWellbeingHasCorrectUsageStatsMode Change-Id: I5689575186655f00e14db815f7bb65f7aacb7cc4
This commit is contained in:
@@ -1182,8 +1182,8 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
}
|
||||
} else {
|
||||
for (int j=0; j<ops.length; j++) {
|
||||
int code = uidState.opModes.keyAt(j);
|
||||
if (code >= 0) {
|
||||
int code = ops[j];
|
||||
if (uidState.opModes.indexOfKey(code) >= 0) {
|
||||
if (resOps == null) {
|
||||
resOps = new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user