/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestablePermissionsTest.java | 18 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 45 PERMISSION_GRANTED); in testCheck() 48 assertEquals(PERMISSION_GRANTED, in testCheck() 56 mContext.getTestablePermissions().setPermission(URI_1, PERMISSION_GRANTED); in testCheckUri() 59 assertEquals(PERMISSION_GRANTED, mContext.checkUriPermission(URI_1, 0, 0, 0)); in testCheckUri() 66 PERMISSION_GRANTED); in testEnforceNoException() 79 mContext.getTestablePermissions().setPermission(URI_1, PERMISSION_GRANTED); in testEnforceUriNoException()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | WifiPermissionsUtil.java | 72 return (permission == PackageManager.PERMISSION_GRANTED); in checkConfigOverridePermission() 88 return (permission == PackageManager.PERMISSION_GRANTED); in checkChangePermission() 104 return (permission == PackageManager.PERMISSION_GRANTED); in checkWifiAccessPermission() 228 == PackageManager.PERMISSION_GRANTED; in checkCallersHardwareLocationPermission() 376 == PackageManager.PERMISSION_GRANTED; in checkCallerHasPeersMacAddressPermission() 393 == PackageManager.PERMISSION_GRANTED; in checkInteractAcrossUsersFull() 450 == PackageManager.PERMISSION_GRANTED; in checkNetworkSettingsPermission() 459 == PackageManager.PERMISSION_GRANTED; in checkLocalMacAddressPermission() 468 == PackageManager.PERMISSION_GRANTED; in checkNetworkSetupWizardPermission() 477 == PackageManager.PERMISSION_GRANTED; in checkNetworkStackPermission() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | WifiPermissionsUtilTest.java | 143 .thenReturn(PackageManager.PERMISSION_GRANTED); in testCheckConfigOverridePermissionApproved() 327 mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED; in testLegacyAppHasLocationAndAllPermissions() 415 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCannotAccessScanResults_LocationModeDisabledHasChangeWifiState() 450 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCannotAccessScanResults_LocationModeDisabledHasAccessWifiState() 522 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasNetworkSettings() 590 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasNetworkSetupWizard() 622 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasNetworkManagedProvisioning() 654 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasNetworkStack() 686 .thenReturn(PackageManager.PERMISSION_GRANTED); in testEnforceCanAccessScanResults_LocationModeDisabledHasMainlineNetworkStack() 718 mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED; in testEnforceCoarseLocationPermissionLegacyApp() [all …]
|
/frameworks/base/core/java/android/content/ |
D | PermissionChecker.java | 71 public static final int PERMISSION_GRANTED = PackageManager.PERMISSION_GRANTED; field in PermissionChecker 83 @IntDef({PERMISSION_GRANTED, 386 return PERMISSION_GRANTED; in checkPermissionCommon() 409 return PERMISSION_GRANTED; in checkPermissionCommon()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/ |
D | ScreenRecordDialog.java | 62 != PackageManager.PERMISSION_GRANTED) { in onCreate() 110 if (permission != PackageManager.PERMISSION_GRANTED) { in onActivityResult() 123 if (videoPermission != PackageManager.PERMISSION_GRANTED in onActivityResult() 124 || audioPermission != PackageManager.PERMISSION_GRANTED) { in onActivityResult()
|
/frameworks/base/services/core/java/com/android/server/os/ |
D | SchedulingPolicyService.java | 114 return PackageManager.PERMISSION_GRANTED; in requestPriority() 142 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost() 167 return PackageManager.PERMISSION_GRANTED; in enableCpusetBoost() 204 return PackageManager.PERMISSION_GRANTED; in disableCpusetBoost()
|
/frameworks/base/telephony/common/com/android/internal/telephony/ |
D | TelephonyPermissions.java | 18 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 316 uid) == PackageManager.PERMISSION_GRANTED) { in checkPrivilegedReadPermissionOrCarrierPrivilegePermission() 410 uid) == PackageManager.PERMISSION_GRANTED) { in reportAccessDeniedToReadIdentifiers() 430 != PERMISSION_GRANTED) { in checkReadCallLog() 550 == PERMISSION_GRANTED) { in enforceCallingOrSelfModifyPermissionOrCarrierPrivilege() 567 == PERMISSION_GRANTED) { in enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege() 587 == PERMISSION_GRANTED) { in enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege() 609 == PERMISSION_GRANTED) { in enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege() 614 == PERMISSION_GRANTED) { in enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege()
|
/frameworks/base/tests/net/common/java/android/net/ |
D | NetworkStackTest.java | 20 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 63 when(mCtx.checkCallingOrSelfPermission(eq(NETWORK_STACK))).thenReturn(PERMISSION_GRANTED); in testCheckNetworkStackPermission() 71 .thenReturn(PERMISSION_GRANTED); in testCheckNetworkStackPermission()
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | LocationPermissionUtil.java | 52 callerIdentity.mPid, callerIdentity.mUid) == PackageManager.PERMISSION_GRANTED; in hasPermissionLocationHardware() 58 callerIdentity.mPid, callerIdentity.mUid) == PackageManager.PERMISSION_GRANTED; in hasPermissionUpdateAppOpsStats()
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestablePermissions.java | 70 if (check(permission) != PackageManager.PERMISSION_GRANTED) { in enforce() 76 if (check(uri, modeFlags) != PackageManager.PERMISSION_GRANTED) { in enforce()
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | ChipsUtil.java | 68 return PackageManager.PERMISSION_GRANTED; in checkPermission() 82 checkPermission(context, permission) == PackageManager.PERMISSION_GRANTED; in hasPermissions()
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | LocationPermissionCheckerTest.java | 166 return PackageManager.PERMISSION_GRANTED; in createPermissionAnswer() 178 mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED; 196 mFineLocationPermission = PackageManager.PERMISSION_GRANTED; 211 mFineLocationPermission = PackageManager.PERMISSION_GRANTED; 238 mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED;
|
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
D | MockTetheringService.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 51 return context.checkCallingOrSelfPermission(WRITE_SETTINGS) == PERMISSION_GRANTED; in checkAndNoteWriteSettingsOperation()
|
/frameworks/base/services/core/java/com/android/server/slice/ |
D | SliceManagerService.java | 25 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 225 == PERMISSION_GRANTED) { in checkSlicePermission() 226 return PERMISSION_GRANTED; in checkSlicePermission() 232 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission() 235 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission() 241 if (mContext.checkPermission(perm, pid, uid) == PERMISSION_GRANTED) { in checkSlicePermission() 245 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission() 251 == PERMISSION_GRANTED) { in checkSlicePermission() 252 return PackageManager.PERMISSION_GRANTED; in checkSlicePermission() 416 != PERMISSION_GRANTED) { in enforceAccess()
|
/frameworks/base/core/java/android/net/ |
D | NetworkStack.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 118 if (context.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED) { in checkAnyPermissionOf()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ConsumerIrService.java | 73 != PackageManager.PERMISSION_GRANTED) { in transmit() 105 != PackageManager.PERMISSION_GRANTED) { in getCarrierFrequencies()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/ |
D | WearPackageIconProvider.java | 39 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 156 if (context.checkPermission(REQUIRED_PERMISSION, pid, uid) == PERMISSION_GRANTED) { in enforcePermissions() 162 == PERMISSION_GRANTED) { in enforcePermissions()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | SliceManagerServiceTest.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 78 mContext.getTestablePermissions().setPermission(TEST_URI, PERMISSION_GRANTED); in setUp() 122 .thenReturn(PERMISSION_GRANTED); in testCheckAutoGrantPermissions()
|
/frameworks/base/services/core/java/com/android/server/compat/ |
D | PlatformCompat.java | 22 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 338 != PERMISSION_GRANTED) { in checkCompatChangeLogPermission() 349 != PERMISSION_GRANTED) { in checkCompatChangeReadPermission() 360 != PERMISSION_GRANTED) { in checkCompatChangeOverridePermission()
|
/frameworks/base/test-runner/src/android/test/ |
D | IsolatedContext.java | 114 return PackageManager.PERMISSION_GRANTED; in checkUriPermission() 119 return PackageManager.PERMISSION_GRANTED; in checkUriPermission()
|
/frameworks/base/services/core/java/com/android/server/media/projection/ |
D | MediaProjectionManagerService.java | 277 != PackageManager.PERMISSION_GRANTED) { in createProjection() 318 != PackageManager.PERMISSION_GRANTED) { in getActiveProjectionInfo() 333 != PackageManager.PERMISSION_GRANTED) { in stopActiveProjection() 351 != PackageManager.PERMISSION_GRANTED) { in addCallback() 366 != PackageManager.PERMISSION_GRANTED) { in removeCallback() 392 == PackageManager.PERMISSION_GRANTED; in checkPermission()
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsAccess.java | 125 READ_NETWORK_USAGE_HISTORY) == PackageManager.PERMISSION_GRANTED) { in checkAccessLevel() 184 return permissionCheck == PackageManager.PERMISSION_GRANTED; in hasAppOpsPermission()
|
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
D | MainActivity.java | 96 permissionDenied[i] = permissionCheck != PackageManager.PERMISSION_GRANTED; in checkPermission() 131 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { in onRequestPermissionsResult()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | IccPhoneBookInterfaceManager.java | 171 != PackageManager.PERMISSION_GRANTED) { in updateAdnRecordsInEfBySearch() 223 != PackageManager.PERMISSION_GRANTED) { in updateAdnRecordsInEfByIndex() 289 != PackageManager.PERMISSION_GRANTED) { in getAdnRecordsInEf()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | SmsPermissionsTest.java | 19 import static android.content.pm.PackageManager.PERMISSION_GRANTED; 207 .thenReturn(PERMISSION_GRANTED); in testCheckCallingOrSelfCanGetSmscAddressPermissions_hasReadPrivilegedPhoneState() 239 .thenReturn(PERMISSION_GRANTED); in testCheckCallingOrSelfCanSetSmscAddressPermissions_hasModifyPhoneState()
|