Loading services/core/java/com/android/server/appop/AppOpsService.java +15 −3 Original line number Diff line number Diff line Loading @@ -4060,9 +4060,11 @@ public class AppOpsService extends IAppOpsService.Stub { private void readOp(XmlPullParser parser, @NonNull UidState uidState, @NonNull String pkgName, boolean isPrivileged) throws NumberFormatException, XmlPullParserException, IOException { Op op = new Op(uidState, pkgName, Integer.parseInt(parser.getAttributeValue(null, "n")), uidState.uid); int opCode = Integer.parseInt(parser.getAttributeValue(null, "n")); if (isIgnoredAppOp(opCode)) { return; } Op op = new Op(uidState, pkgName, opCode, uidState.uid); final int mode = XmlUtils.readIntAttribute(parser, "m", AppOpsManager.opToDefaultMode(op.op)); Loading Loading @@ -4096,6 +4098,16 @@ public class AppOpsService extends IAppOpsService.Stub { ops.put(op.op, op); } //TODO(b/149995538): Remove once this has reached all affected devices private static boolean isIgnoredAppOp(int op) { switch (op) { case AppOpsManager.OP_MANAGE_EXTERNAL_STORAGE: return true; default: return false; } } void writeState() { synchronized (mFile) { FileOutputStream stream; Loading Loading
services/core/java/com/android/server/appop/AppOpsService.java +15 −3 Original line number Diff line number Diff line Loading @@ -4060,9 +4060,11 @@ public class AppOpsService extends IAppOpsService.Stub { private void readOp(XmlPullParser parser, @NonNull UidState uidState, @NonNull String pkgName, boolean isPrivileged) throws NumberFormatException, XmlPullParserException, IOException { Op op = new Op(uidState, pkgName, Integer.parseInt(parser.getAttributeValue(null, "n")), uidState.uid); int opCode = Integer.parseInt(parser.getAttributeValue(null, "n")); if (isIgnoredAppOp(opCode)) { return; } Op op = new Op(uidState, pkgName, opCode, uidState.uid); final int mode = XmlUtils.readIntAttribute(parser, "m", AppOpsManager.opToDefaultMode(op.op)); Loading Loading @@ -4096,6 +4098,16 @@ public class AppOpsService extends IAppOpsService.Stub { ops.put(op.op, op); } //TODO(b/149995538): Remove once this has reached all affected devices private static boolean isIgnoredAppOp(int op) { switch (op) { case AppOpsManager.OP_MANAGE_EXTERNAL_STORAGE: return true; default: return false; } } void writeState() { synchronized (mFile) { FileOutputStream stream; Loading