/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | AppOpsUtils.java | 58 public static String setOpMode(String packageName, String opStr, int mode) in setOpMode() argument 77 String command = appops("set") + packageName + " " + opStr + " " + modeStr; in setOpMode() 84 public static void setUidMode(int uid, String opStr, int mode) { in setUidMode() argument 87 SystemUtil.runWithShellPermissionIdentity(() -> aom.setUidMode(opStr, uid, mode)); in setUidMode() 93 public static int getOpMode(String packageName, String opStr) in getOpMode() argument 95 String opState = getOpState(packageName, opStr); in getOpMode() 116 public static boolean allowedOperationLogged(String packageName, String opStr) in allowedOperationLogged() argument 118 return getOpState(packageName, opStr).contains(" time="); in allowedOperationLogged() 128 public static boolean rejectedOperationLogged(String packageName, String opStr) in rejectedOperationLogged() argument 130 return getOpState(packageName, opStr).contains(" rejectTime="); in rejectedOperationLogged() [all …]
|
/cts/tests/tests/appop/appopsTestUtilLib/src/android/app/appops/cts/ |
D | AppOpsUtils.kt | 53 fun setOpMode(packageName: String, opStr: String, mode: Int): String { in setOpMode() 61 val command = "appops set $packageName $opStr $modeStr" in setOpMode() 68 fun getOpMode(packageName: String, opStr: String): Int { in getOpMode() 69 val opState = getOpState(packageName, opStr) in getOpMode() 86 fun allowedOperationLogged(packageName: String, opStr: String): Boolean { in allowedOperationLogged() 87 return getOpState(packageName, opStr).contains(" time=") in allowedOperationLogged() 97 fun rejectedOperationLogged(packageName: String, opStr: String): Boolean { in rejectedOperationLogged() 98 return getOpState(packageName, opStr).contains(" rejectTime=") in rejectedOperationLogged() 120 private fun getOpState(packageName: String, opStr: String): String { in getOpState() 121 return runCommand("appops get $packageName $opStr") in getOpState()
|
/cts/tests/tests/appop/src/android/app/appops/cts/ |
D | AppOpDefinitionTest.kt | 38 val opStr = opStrs[opCode] in ensureRuntimeAppOpMappingIsCorrect() constant 48 missingPerms.add(Triple(opStr, permission, permType)) in ensureRuntimeAppOpMappingIsCorrect() 56 for ((opStr, perm, permType) in missingPerms) { in ensureRuntimeAppOpMappingIsCorrect() constant 57 message.append("$opStr missing mapping to $permType permission $perm \n") in ensureRuntimeAppOpMappingIsCorrect()
|
D | AppOpsTest.kt | 877 for (opStr in AppOpsManager.getOpStrs()) { in testAllOpsHaveOpString() constant 878 assertNotNull("Each app op must have an operation string defined", opStr) in testAllOpsHaveOpString() 879 opStrs.add(opStr) in testAllOpsHaveOpString() 888 for (opStr in opStrs) { in testOpCodesUnique() constant 889 opCodes.add(AppOpsManager.strOpToOp(opStr)) in testOpCodesUnique() 901 private fun testPermissionMapping(permission: String, opStr: String) { in testPermissionMapping() 904 assertEquals(opStr, mappedOpStr) in testPermissionMapping() 905 val opCode = AppOpsManager.strOpToOp(opStr) in testPermissionMapping() 910 val strMappedPermission = AppOpsManager.opToPermission(opStr) in testPermissionMapping()
|
D | AppOpsDeviceAwareTest.kt | 150 assertThat(opEntryForDefaultDevice.opStr).isEqualTo(AppOpsManager.OPSTR_CAMERA) in getPackagesForOps_isDeviceAware() 168 assertThat(opEntry.opStr).isEqualTo(AppOpsManager.OPSTR_CAMERA) in getPackagesForOps_isDeviceAware()
|
D | AppOpEventCollectionTest.kt | 99 assertThat(opEntry.opStr).isEqualTo(OPSTR_RESERVED_FOR_TESTING) in ensureCorrectOpStr()
|
/cts/tests/tests/activityrecognition/src/android/activityrecognition/cts/ |
D | ActivityRecognizerAttributionTags.kt | 128 if (unexpectedOp == opEntry.opStr) { in assertNotedOpsSinceLastArAccess() 130 } else if (expectedOp == opEntry.opStr) { in assertNotedOpsSinceLastArAccess()
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityManagerApi29Test.java | 353 private int noteOp(String opStr) throws Exception { in noteOp() argument 355 () -> sAppOps.noteOp(opStr, sUid, PACKAGE_NAME, in noteOp() 356 opStr, "")); in noteOp()
|
D | ActivityManagerFgsBgStartTest.java | 2557 private void setAppOp(String packageName, String opStr, boolean allow) throws Exception { in setAppOp() argument 2559 "appops set " + packageName + " " + opStr + " " in setAppOp()
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | ServiceProcessController.java | 166 public void setAppOpMode(String opStr, String mode) throws IOException { in setAppOpMode() argument 168 + mServicePackage + " " + opStr + " " + mode; in setAppOpMode()
|
/cts/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/ |
D | AtomTests.java | 400 private void noteAppOp(AppOpsManager aom, String opStr) { in noteAppOp() argument 401 aom.noteOp(opStr, android.os.Process.myUid(), MY_PACKAGE_NAME, null, "statsdTest"); in noteAppOp() 404 private void startAppOp(AppOpsManager aom, String opStr) { in startAppOp() argument 405 aom.startOp(opStr, android.os.Process.myUid(), MY_PACKAGE_NAME, null, "statsdTest"); in startAppOp()
|
/cts/tests/tests/attributionsource/src/android/attributionsource/cts/ |
D | RuntimePermissionsAppOpTrackingTest.kt | 892 if (!op.equals(opEntry.opStr)) { in <lambda>() 930 if (!op.equals(opEntry.opStr)) { in <lambda>() 1027 if (op != opEntry.opStr) { in <lambda>()
|
/cts/tests/framework/base/windowmanager/backgroundactivity/src/android/server/wm/ |
D | BackgroundActivityLaunchTest.java | 1382 final String opStr = "android:system_alert_window"; in grantSystemAlertWindow() local 1383 AppOpsUtils.setOpMode(packageName, opStr, mode); in grantSystemAlertWindow() 1384 assertThat(AppOpsUtils.getOpMode(packageName, opStr)).isEqualTo(mode); in grantSystemAlertWindow()
|