Home
last modified time | relevance | path

Searched refs:MODE_ALLOWED (Results 1 – 25 of 41) sorted by relevance

12

/cts/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/
DCrossProfileAppsPermissionToInteractTest.java89 setAppOpOnAllProfiles(AppOpsManager.MODE_ALLOWED); in testCanInteractAcrossProfiles_withAppOpEnabled_returnsTrue()
98 setAppOpOnAllProfiles(AppOpsManager.MODE_ALLOWED, /* includeCallingProfile= */ false); in testCanInteractAcrossProfiles_withCrossProfilesPermission_returnsTrue()
111 setAppOpOnAllProfiles(AppOpsManager.MODE_ALLOWED, /* includeCallingProfile= */ false); in testCanInteractAcrossProfiles_withCrossUsersPermission_returnsTrue()
124 setAppOpOnAllProfiles(AppOpsManager.MODE_ALLOWED, /* includeCallingProfile= */ false); in testCanInteractAcrossProfiles_withCrossUsersFullPermission_returnsTrue()
135 setAppOpOnAllProfiles(AppOpsManager.MODE_ALLOWED, /* includeCallingProfile= */ false); in testCanInteractAcrossProfiles_withAppOpDisabledOnCallingProfile_returnsFalse()
144 setAppOpOnCurrentProfile(AppOpsManager.MODE_ALLOWED); in testCanInteractAcrossProfiles_withAppOpDisabledOnOtherProfiles_returnsFalse()
151 setAppOpOnCurrentProfile(AppOpsManager.MODE_ALLOWED); in testCanInteractAcrossProfiles_withNoOtherProfile_returnsFalse()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DAppOpsUtils.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
58 case MODE_ALLOWED: in setOpMode()
84 return MODE_ALLOWED; in getOpMode()
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java22 import static android.app.AppOpsManager.MODE_ALLOWED;
177 return getAppOp(packageName, ACCESS_COARSE_LOCATION) == MODE_ALLOWED; in isGranted()
180 return mode == MODE_ALLOWED || mode == MODE_FOREGROUND; in isGranted()
202 setAppOp(packageName, ACCESS_COARSE_LOCATION, MODE_ALLOWED); in grantPermission()
209 setAppOp(packageName, ACCESS_COARSE_LOCATION, MODE_ALLOWED); in grantPermission()
214 setAppOpByName(packageName, OPSTR_GET_USAGE_STATS, MODE_ALLOWED); in grantPermission()
216 setAppOp(packageName, permission, MODE_ALLOWED); in grantPermission()
/cts/tests/tests/appop/src/android/app/appops/cts/
DForegroundModeAndActiveTest.kt24 import android.app.AppOpsManager.MODE_ALLOWED in <lambda>()
135 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
182 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
189 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
242 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
266 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
308 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
352 assertThat(testPkgAppOpMode).isEqualTo(MODE_ALLOWED) in <lambda>()
/cts/tests/tests/appop/appopsTestUtilLib/src/android/app/appops/cts/
DAppOpsUtils.kt20 import android.app.AppOpsManager.MODE_ALLOWED
55 MODE_ALLOWED -> "allow" in setOpMode()
71 opState.contains(" allow") -> MODE_ALLOWED in getOpMode()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/appops/
DAppOps.java38 ALLOWED(AppOpsManager.MODE_ALLOWED),
52 case AppOpsManager.MODE_ALLOWED: in forValue()
/cts/tests/tests/permission/src/android/permission/cts/
DBackgroundPermissionsTest.java22 import static android.app.AppOpsManager.MODE_ALLOWED;
182 getAppOp(APP_PKG, ACCESS_COARSE_LOCATION)).isEqualTo(MODE_ALLOWED)); in appOpIsSetIfCoarseAndBgLocPermIsGranted()
216 getAppOp(APP_PKG, ACCESS_COARSE_LOCATION)).isEqualTo(MODE_ALLOWED)); in appOpIsSetIfFineAndBgLocPermIsGranted()
252 getAppOp(APP_PKG, ACCESS_COARSE_LOCATION)).isEqualTo(MODE_ALLOWED)); in appOpIsSetIfFineCoarseAndBgLocPermIsGranted()
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DExternalSourcesTestAppOpAllowed.kt18 import android.app.AppOpsManager.MODE_ALLOWED
73 .isEqualTo(MODE_ALLOWED) in verifyAppOpAllowed()
/cts/tests/app/src/android/app/cts/
DActivityManagerApi29Test.java22 import static android.app.AppOpsManager.MODE_ALLOWED;
185 assertEquals(MODE_ALLOWED, noteOp(OPSTR_COARSE_LOCATION)); in testTopActivityWithAppOps()
220 assertEquals(MODE_ALLOWED, noteOp(OPSTR_COARSE_LOCATION)); in testFgsLocationWithAppOps()
331 assertEquals(MODE_ALLOWED, noteOp(OPSTR_CAMERA)); in testCameraWithAppOps()
332 assertEquals(MODE_ALLOWED, noteOp(OPSTR_RECORD_AUDIO)); in testCameraWithAppOps()
/cts/tests/tests/permission2/src/android/permission2/cts/
DRestrictedStoragePermissionSharedUidTest.java20 import static android.app.AppOpsManager.MODE_ALLOWED;
117 mPkg)).isEqualTo(MODE_ALLOWED); in assertHasNotIsolatedStorage()
121 mPkg)).isNotEqualTo(MODE_ALLOWED); in assertHasNotIsolatedStorage()
DRestrictedPermissionsTest.java529 possibleModes.add(AppOpsManager.MODE_ALLOWED); in assertRestrictedPermissionWhitelisted()
535 possibleModes.add(AppOpsManager.MODE_ALLOWED); in assertRestrictedPermissionWhitelisted()
542 possibleModes.add(AppOpsManager.MODE_ALLOWED); in assertRestrictedPermissionWhitelisted()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DAlertWindowsAppOpsTests.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
72 AppOpsUtils.setOpMode(packageName, OPSTR_SYSTEM_ALERT_WINDOW, MODE_ALLOWED); in grantSystemAlertWindowAccess()
DAlertWindowsTests.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
220 int mode = allow ? MODE_ALLOWED : MODE_ERRORED; in setAlertWindowPermission()
DAlertWindowsImportanceTests.java22 import static android.app.AppOpsManager.MODE_ALLOWED;
174 final int mode = allow ? MODE_ALLOWED : MODE_ERRORED; in setAlertWindowPermission()
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java23 import static android.app.AppOpsManager.MODE_ALLOWED;
127 assertEquals(MODE_ALLOWED, getAppOp(APP22, ACCESS_FINE_LOCATION)); in testGrantDeniedRuntimePermission22()
236 assertEquals(MODE_ALLOWED, getAppOp(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
258 assertEquals(MODE_ALLOWED, getAppOp(APP22, ACCESS_FINE_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission22()
/cts/apps/CrossProfileTestApp/src/com/android/cts/crossprofilepermissioncontrol/
DTestActivity.java65 if (AppOpsManager.MODE_ALLOWED == mAppOpsManager.checkOpNoThrow( in updateText()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DCarrierConfigManagerTest.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
96 setOpMode("--uid android.telephony.cts", OPSTR_READ_PHONE_STATE, MODE_ALLOWED); in tearDown()
222 setOpMode("--uid android.telephony.cts", OPSTR_READ_PHONE_STATE, MODE_ALLOWED); in testRevokePermission()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DExpeditedJobTest.java63 AppOpsManager.MODE_ALLOWED); in setUp()
/cts/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/
DUninstallTest.java18 import static android.app.AppOpsManager.MODE_ALLOWED;
113 AppOpsUtils.setOpMode(mContext.getPackageName(), "SYSTEM_ALERT_WINDOW", MODE_ALLOWED); in overlaysAreSuppressedWhenConfirmingUninstall() local
/cts/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/src/com/android/cts/context/
DContextCrossProfileDeviceTest.java185 Binder.getCallingUid(), context.getPackageName(), AppOpsManager.MODE_ALLOWED); in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossProfilesAppOp_bindsService()
205 Binder.getCallingUid(), context.getPackageName(), AppOpsManager.MODE_ALLOWED); in testBindServiceAsUser_sameProfileGroup_differentPackage_withAcrossProfilesAppOp_throwsException()
272 Binder.getCallingUid(), context.getPackageName(), AppOpsManager.MODE_ALLOWED); in testBindServiceAsUser_differentProfileGroup_withInteractAcrossProfilesAppOp_throwsException()
/cts/tests/tests/provider/src/android/provider/cts/media/
DMediaStoreTest.java253 setAppOpsModeForUid(Process.myUid(), AppOpsManager.MODE_ALLOWED, SYSTEM_GALERY_APPOPS); in testIsCurrentSystemGallery()
277 setAppOpsModeForUid(Process.myUid(), AppOpsManager.MODE_ALLOWED, opString); in testCanManageMedia()
/cts/tests/tests/permission3/src/android/permission3/cts/
DPermissionTest30WithBluetooth.kt103 packageManager.getPackageUid(context.packageName, 0), AppOpsManager.MODE_ALLOWED) in testGivenBluetoothIsDeniedWhenScanIsAttemptedThenThenGetEmptyScanResult()
/cts/tests/suspendapps/tests/src/android/suspendapps/cts/
DSuspendPackagesTest.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
262 MODE_ALLOWED, mode); in assertOpDisallowed()
/cts/tests/tests/telecom/src/android/telecom/cts/
DThirdPartyInCallServiceAppOpsPermissionTest.java202 uid, allow ? AppOpsManager.MODE_ALLOWED : AppOpsManager.opToDefaultMode( in setInCallServiceAppOpsPermission()
DTelecomManagerTest.java77 uid, AppOpsManager.MODE_ALLOWED)); in testHasManageOngoingCallsPermission()

12