From df9836cc56cbf9c92dd5f805cc5b2eb3bdd1828a Mon Sep 17 00:00:00 2001 From: shafik Date: Mon, 27 Apr 2020 10:18:11 +0100 Subject: [PATCH] MANAGE_EXTERNAL_STORAGE cleanup: remove isIgnoredAppOp We previously had to add this to fix an issue where we used to setMode instead of setUidMode. Now that this change has rolled out to DP2 and the relevant populations, we can safely remove this check. Test: build Fix: 149995538 Change-Id: Ib6ba0a9bdacb16cc53f5883d34d67c2df92d4161 --- .../com/android/server/appop/AppOpsService.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java index 31bcceaba889f..a46e5c48bc9e4 100644 --- a/services/core/java/com/android/server/appop/AppOpsService.java +++ b/services/core/java/com/android/server/appop/AppOpsService.java @@ -4134,9 +4134,6 @@ public class AppOpsService extends IAppOpsService.Stub { throws NumberFormatException, XmlPullParserException, IOException { 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", @@ -4171,16 +4168,6 @@ 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;