/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | UndefinedGroupPermissionTest.kt | 132 mPm!!.checkPermission(CAMERA, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 136 mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 140 mPm!!.checkPermission(TEST, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 151 mPm!!.checkPermission(CAMERA, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 155 mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 159 mPm!!.checkPermission(TEST, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 191 mPm!!.checkPermission(grantedPerm, APP_PKG_NAME) in testOtherGroupPermissionsNotGranted() 213 mPm!!.checkPermission(targetPermission, APP_PKG_NAME) in testOtherGroupPermissionsNotGranted() 219 mPm!!.checkPermission(targetPermission, APP_PKG_NAME) in testOtherGroupPermissionsNotGranted()
|
D | SdkSandboxPermissionTest.java | 47 int ret = ctx.checkPermission( in testSdkSandboxHasInternetPermission() 58 int ret = ctx.checkPermission( in testSdkSandboxDoesNotHaveFineLocationPermission()
|
D | OneTimePermissionTest.java | 237 .checkPermission(ACCESS_FINE_LOCATION, APP_PKG_NAME)); in testStickyServiceMaintainsPermissionOnRestart() 255 .checkPermission(CAMERA, CUSTOM_CAMERA_PERM_APP_PKG_NAME)), 30000); in testCustomPermissionIsGrantedOneTime() 260 .checkPermission(CUSTOM_PERMISSION, CUSTOM_CAMERA_PERM_APP_PKG_NAME)), in testCustomPermissionIsGrantedOneTime() 268 .checkPermission(ACCESS_FINE_LOCATION, APP_PKG_NAME)), timeoutMillis); in assertGrantedState()
|
D | DevicePermissionsTest.kt | 215 permissionManager.checkPermission( in testGrantAndRevokeDeviceAwarePermissionByPersistentDeviceId() 224 permissionManager.checkPermission( in testGrantAndRevokeDeviceAwarePermissionByPersistentDeviceId() 240 permissionManager.checkPermission( in testGrantAndRevokeDeviceAwarePermissionByPersistentDeviceId() 540 assertThat(context.packageManager.checkPermission(permissionName, TEST_PACKAGE_NAME)) in assertPermission()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | PermissionHelperTest.java | 219 when(mMockPackageManagerGrant.checkPermission(ACCESS_ADSERVICES_TOPICS, SDK_PACKAGE_NAME)) 221 when(mMockPackageManagerGrant.checkPermission(ACCESS_ADSERVICES_AD_ID, SDK_PACKAGE_NAME)) 223 when(mMockPackageManagerGrant.checkPermission( 226 when(mMockPackageManagerGrant.checkPermission( 255 when(mMockPackageManagerDeny.checkPermission(ACCESS_ADSERVICES_TOPICS, SDK_PACKAGE_NAME)) 257 when(mMockPackageManagerDeny.checkPermission(ACCESS_ADSERVICES_AD_ID, SDK_PACKAGE_NAME)) 259 when(mMockPackageManagerDeny.checkPermission( 262 when(mMockPackageManagerDeny.checkPermission(
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/util/ |
D | DiscoveryPermissionsTest.java | 65 when(mMockContext.checkPermission(BLUETOOTH_SCAN, PID, UID)).thenReturn(PERMISSION_DENIED); in test_enforceCallerDiscoveryPermission_exception() 74 when(mMockContext.checkPermission(BLUETOOTH_SCAN, PID, UID)).thenReturn(PERMISSION_GRANTED); in test_checkCallerDiscoveryPermission_granted() 83 when(mMockContext.checkPermission(BLUETOOTH_SCAN, PID, UID)).thenReturn(PERMISSION_DENIED); in test_checkCallerDiscoveryPermission_denied() 112 when(mMockContext.checkPermission(BLUETOOTH_SCAN, PID, UID)).thenReturn(PERMISSION_DENIED); in test_getPermissionLevel_none() 121 when(mMockContext.checkPermission(BLUETOOTH_SCAN, PID, UID)) in test_getPermissionLevel_scan()
|
D | BroadcastPermissionsTest.java | 61 when(mMockContext.checkPermission(BLUETOOTH_ADVERTISE, PID, UID)) in test_checkCallerBroadcastPermission_granted() 71 when(mMockContext.checkPermission(BLUETOOTH_ADVERTISE, PID, UID)) in test_checkCallerBroadcastPermission_deniedPermission() 81 when(mMockContext.checkPermission(BLUETOOTH_ADVERTISE, PID, UID)) in test_getPermissionLevel_none() 90 when(mMockContext.checkPermission(BLUETOOTH_ADVERTISE, PID, UID)) in test_getPermissionLevel_advertising()
|
/packages/services/Car/cpp/evs/manager/1.0/ |
D | Enumerator.cpp | 40 bool Enumerator::checkPermission() { in checkPermission() function in android::automotive::evs::V1_0::implementation::Enumerator 53 if (!checkPermission()) { in getCameraList() 63 if (!checkPermission()) { in openCamera() 147 if (!checkPermission()) { in openDisplay() 195 if (!checkPermission()) { in getDisplayState()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiDialogActivityTest.java | 270 when(mPackageManager.checkPermission(ACCESS_COARSE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_noPermission_returnFalse() 272 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_noPermission_returnFalse() 284 when(mPackageManager.checkPermission(ACCESS_COARSE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_hasCoarseLocationPermission_returnFalse() 286 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_hasCoarseLocationPermission_returnFalse() 298 when(mPackageManager.checkPermission(ACCESS_COARSE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_hasFineLocationPermission_returnTrue() 300 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_hasFineLocationPermission_returnTrue() 312 when(mPackageManager.checkPermission(ACCESS_COARSE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_haveBothLocationPermissions_returnTrue() 314 when(mPackageManager.checkPermission(ACCESS_FINE_LOCATION, CALLING_PACKAGE)) in hasPermissionForResult_haveBothLocationPermissions_returnTrue()
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | EmergencyCallHelperTest.java | 82 when(mPackageManager.checkPermission(eq(ACCESS_BACKGROUND_LOCATION), in setUp() 86 when(mPackageManager.checkPermission(eq(ACCESS_FINE_LOCATION), in setUp() 168 when(mPackageManager.checkPermission(eq(ACCESS_BACKGROUND_LOCATION), in testNoPermGrantWhenPackageHasAllPerms() 172 when(mPackageManager.checkPermission(eq(ACCESS_FINE_LOCATION), in testNoPermGrantWhenPackageHasAllPerms() 223 when(mPackageManager.checkPermission(eq(ACCESS_BACKGROUND_LOCATION), in testOnlyFineLocationPermIsGrantedAndRevoked() 241 when(mPackageManager.checkPermission(eq(ACCESS_FINE_LOCATION), in testOnlyBackgroundLocationPermIsGrantedAndRevoked()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | AdaptiveSleepPreferenceControllerTest.java | 81 when(mPackageManager.checkPermission(any(), any())).thenReturn( in setUp() 128 when(mPackageManager.checkPermission(any(), any())).thenReturn( in hasSufficientPermission_permissionNotGranted_returnFalse() 138 when(mPackageManager.checkPermission(any(), any())).thenReturn( in addToScreen_normalCase_enablePreference() 150 when(mPackageManager.checkPermission(any(), any())).thenReturn( in addToScreen_permissionNotGranted_disablePreference()
|
D | AdaptiveSleepPermissionPreferenceControllerTest.java | 57 when(mPackageManager.checkPermission(any(), any())).thenReturn( in setUp() 72 when(mPackageManager.checkPermission(any(), any())).thenReturn( in addToScreen_permissionNotGranted_showPreference()
|
/packages/services/Car/cpp/evs/sampleDriver/hidl/ |
D | EvsEnumerator.cpp | 63 bool EvsEnumerator::checkPermission() { in checkPermission() function in android::hardware::automotive::evs::V1_1::implementation::EvsEnumerator 222 if (!checkPermission()) { in getCameraList() 258 if (!checkPermission()) { in openCamera() 311 if (!checkPermission()) { in openDisplay() 352 if (!checkPermission()) { in getDisplayState() 368 if (!checkPermission()) { in getCameraList_1_1() 439 if (!checkPermission()) { in openCamera_1_1() 494 if (!checkPermission()) { in openDisplay_1_1()
|
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/ |
D | PermissionMaxSdkVersionTest.java | 40 int result = mContext.checkPermission(UNGRANTABLE_PERMISSION, in testMaxSdkInPast() 53 int result = mContext.checkPermission(GRANTABLE_PERMISSION, in testMaxSdkInFuture()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | LocationPermissionCheckerTest.java | 168 doAnswer(mReturnPermission).when(mMockContext).checkPermission( in setupMockInterface() 173 when(mMockContext.checkPermission(mManifestStringCoarse, -1, mUid)) in setupMockInterface() 175 when(mMockContext.checkPermission(mManifestStringFine, -1, mUid)) in setupMockInterface() 177 when(mMockContext.checkPermission(NETWORK_SETTINGS, -1, mUid)) in setupMockInterface()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/trustagent/ |
D | TrustAgentManagerTest.java | 102 when(mPackageManager.checkPermission(TrustAgentManager.PERMISSION_PROVIDE_AGENT, in shouldProvideTrust_doesProvideTrustWithPermission() 115 when(mPackageManager.checkPermission(TrustAgentManager.PERMISSION_PROVIDE_AGENT, in shouldProvideTrust_doesNotProvideTrustWithoutPermission() 178 when(mPackageManager.checkPermission(TrustAgentManager.PERMISSION_PROVIDE_AGENT, in setUpGetActiveTrustAgents()
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | PermissionUtils.java | 133 return (context.checkPermission(BACKUP, pid, uid) == PERMISSION_GRANTED) in checkPermissionDelegator() 134 || (context.checkPermission(UPDATE_DEVICE_STATS, pid, uid) == PERMISSION_GRANTED); in checkPermissionDelegator() 399 return context.checkPermission( in checkManageCloudMediaProvidersPermission() 581 return context.checkPermission(permission, pid, uid) == PERMISSION_GRANTED; in checkPermissionCommon() 625 return context.checkPermission(permission, pid, uid) == PERMISSION_GRANTED; in checkAppOpPermission() 634 if (context.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_DENIED) { in checkRuntimePermission()
|
/packages/services/Car/cpp/evs/manager/aidl/src/ |
D | Enumerator.cpp | 194 bool Enumerator::checkPermission() const { in checkPermission() function in aidl::android::automotive::evs::implementation::Enumerator 278 if (!checkPermission()) { in getCameraList() 304 if (!checkPermission()) { in closeCamera() 365 if (!checkPermission()) { in openCamera() 460 if (!checkPermission()) { in openDisplay() 557 if (!checkPermission()) { in getDisplayState() 578 if (!checkPermission()) { in getDisplayStateById()
|
/packages/modules/Permission/tests/cts/permissionui/src/android/permissionui/cts/ |
D | PermissionTapjackingTest.kt | 106 packageManager.checkPermission(ACCESS_FINE_LOCATION, APP_PACKAGE_NAME) == in tryClicking() 127 packageManager.checkPermission(ACCESS_FINE_LOCATION, APP_PACKAGE_NAME) == in tryClicking()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WifiServiceImplTest.java | 643 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in setUp() 645 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETUP_WIZARD), in setUp() 647 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_STACK), in setUp() 649 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_MANAGED_PROVISIONING), in setUp() 886 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testSetWifiEnabledMetricsPrivilegedApp() 956 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testSetWifiEnabledSuccessWithNetworkSettingsPermission() 971 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_MANAGED_PROVISIONING), in testSetWifiEnabledSuccessWithNetworkManagedProvisioningPermission() 1097 when(mContext.checkPermission( in testSetWifiEnabledFromNetworkSettingsHolderWhenInAirplaneMode() 1118 when(mContext.checkPermission( in testSetWifiEnabledFromAppFailsWhenInAirplaneMode() 1133 when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testSetWifiEnabledFromUserFailsWhenUserRestrictionSet() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | FocusEntryTest.java | 113 when(mMockPM.checkPermission(Car.PERMISSION_RECEIVE_CAR_AUDIO_DUCKING_EVENTS, PACKAGE_NAME)) in withPermission() 118 when(mMockPM.checkPermission(Car.PERMISSION_RECEIVE_CAR_AUDIO_DUCKING_EVENTS, PACKAGE_NAME)) in withoutPermission()
|
/packages/services/Telephony/tests/src/com/android/phone/ |
D | LocationAccessPolicyTest.java | 193 when(mContext.checkPermission(eq(Manifest.permission.ACCESS_FINE_LOCATION), in setupScenario() 197 when(mContext.checkPermission(eq(Manifest.permission.ACCESS_COARSE_LOCATION), in setupScenario() 210 when(mContext.checkPermission(eq(Manifest.permission.INTERACT_ACROSS_USERS_FULL), in setupScenario() 214 when(mContext.checkPermission(eq(Manifest.permission.INTERACT_ACROSS_USERS_FULL), in setupScenario()
|
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ui/permissions/ |
D | RequestHealthPermissionUITest.kt | 121 Truth.assertThat(context.packageManager.checkPermission(permName, packageName)) in assertPermGrantedForApp() 127 Truth.assertThat(context.packageManager.checkPermission(permName, packageName)) in assertPermNotGrantedForApp()
|
D | ManageAppHealthPermissionUITest.kt | 129 assertThat(context.packageManager.checkPermission(permName, packageName)) in assertPermNotGrantedForApp() 135 assertThat(context.packageManager.checkPermission(permName, packageName)) in assertPermGrantedForApp()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | EmergencyCallHelper.java | 206 return mContext.getPackageManager().checkPermission( in hasBackgroundLocationPermission() 213 return mContext.getPackageManager().checkPermission( in hasFineLocationPermission()
|