/aosp12/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/ |
H A D | PermissionUtilsTest.kt | 49 doReturn(PERMISSION_GRANTED).`when`(context).checkCallingOrSelfPermission(TEST_PERMISSION1) 50 doReturn(PERMISSION_DENIED).`when`(context).checkCallingOrSelfPermission(TEST_PERMISSION2) 54 doReturn(PERMISSION_DENIED).`when`(context).checkCallingOrSelfPermission(TEST_PERMISSION1) 59 doReturn(PERMISSION_DENIED).`when`(context).checkCallingOrSelfPermission(any()) 67 doReturn(PERMISSION_GRANTED).`when`(context).checkCallingOrSelfPermission(NETWORK_STACK) 69 .checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK) 73 doReturn(PERMISSION_DENIED).`when`(context).checkCallingOrSelfPermission(NETWORK_STACK) 75 .checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK) 79 doReturn(PERMISSION_DENIED).`when`(context).checkCallingOrSelfPermission(NETWORK_STACK) 81 .checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK) [all …]
|
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
H A D | SmsPermissionsTest.java | 198 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanGetSmscAddressPermissions_defaultSmsApp() 206 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanGetSmscAddressPermissions_hasReadPrivilegedPhoneState() 216 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanGetSmscAddressPermissions_noPermissions() 230 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanSetSmscAddressPermissions_defaultSmsApp() 238 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanSetSmscAddressPermissions_hasModifyPhoneState() 248 Mockito.when(mMockContext.checkCallingOrSelfPermission( in testCheckCallingOrSelfCanSetSmscAddressPermissions_noPermissions()
|
H A D | TelephonyPermissionsTest.java | 442 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_noPermissions() 446 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_noPermissions() 468 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_withPermissions() 480 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_withPermissions() 485 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_withPermissions() 505 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_withPrivileges() 509 when(mMockContext.checkCallingOrSelfPermission( in testEnforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege_withPrivileges() 578 when(mMockContext.checkCallingOrSelfPermission( in setupMocksForDeviceIdentifiersErrorPath()
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/ |
H A D | NetworkScoreServiceTest.java | 357 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_notActiveScorer_noRequestNetworkScoresPermission() 370 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_activeScorer_noRequestNetworkScoresPermission() 391 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_notActiveScorer_hasRequestNetworkScoresPermission() 403 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testSetActiveScorer_noScoreNetworksPermission() 405 when(mContext.checkCallingOrSelfPermission(permission.SCORE_NETWORKS)) in testSetActiveScorer_noScoreNetworksPermission() 418 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testSetActiveScorer_requestNetworkScoresPermission() 427 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testDisableScoring_notActiveScorer_noRequestNetworkScoresPermission() 441 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testDisableScoring_activeScorer_noRequestNetworkScoresPermission() 557 when(mContext.checkCallingOrSelfPermission(permission.SCORE_NETWORKS)) in testGetActiveScorerPackage_missingRequiredPermissions() 572 when(mContext.checkCallingOrSelfPermission(permission.SCORE_NETWORKS)) in testGetActiveScorerPackage_noRequestScoresPermission() [all …]
|
/aosp12/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
H A D | TetheringService.java | 254 return checkCallingOrSelfPermission(NETWORK_STACK) in hasNetworkStackPermission() 255 || checkCallingOrSelfPermission(PERMISSION_MAINLINE_NETWORK_STACK); in hasNetworkStackPermission() 259 return checkCallingOrSelfPermission(TETHER_PRIVILEGED); in hasTetherPrivilegedPermission() 262 private boolean checkCallingOrSelfPermission(final String permission) { in checkCallingOrSelfPermission() method in TetheringService.TetheringConnector 263 return mService.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED; in checkCallingOrSelfPermission() 286 return mService.checkCallingOrSelfPermission( in hasTetherAccessPermission()
|
/aosp12/frameworks/base/telephony/common/com/android/internal/telephony/ |
H A D | TelephonyPermissions.java | 454 return context.checkCallingOrSelfPermission( in checkCallingOrSelfUseIccAuthWithDeviceIdentifier() 549 if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) in enforceCallingOrSelfModifyPermissionOrCarrierPrivilege() 566 if (context.checkCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE) in enforceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege() 586 if (context.checkCallingOrSelfPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) in enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege() 608 if (context.checkCallingOrSelfPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) in enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege() 613 if (context.checkCallingOrSelfPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) in enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege() 687 if (context.checkCallingOrSelfPermission(perm) == PERMISSION_GRANTED) { in enforceAnyPermissionGranted() 717 if (context.checkCallingOrSelfPermission(perm) == PERMISSION_GRANTED) { in enforceAnyPermissionGrantedOrCarrierPrivileges()
|
/aosp12/frameworks/base/services/core/java/com/android/server/ |
H A D | ConsumerIrService.java | 72 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.TRANSMIT_IR) in transmit() 104 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.TRANSMIT_IR) in getCarrierFrequencies()
|
H A D | SystemUpdateManagerService.java | 117 if (mContext.checkCallingOrSelfPermission(Manifest.permission.READ_SYSTEM_UPDATE_INFO) in retrieveSystemUpdateInfo() 119 && mContext.checkCallingOrSelfPermission(Manifest.permission.RECOVERY) in retrieveSystemUpdateInfo()
|
/aosp12/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
H A D | HelpersTest.java | 410 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_noPermission() 413 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_noPermission() 435 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_installer() 438 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_installer() 461 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_WES() 464 when(mockContext.checkCallingOrSelfPermission( in checkDestinationFilePathRestrictions_WES()
|
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
H A D | IccPhoneBookInterfaceManager.java | 205 if (mPhone.getContext().checkCallingOrSelfPermission( in updateAdnRecordsInEfBySearchForSubscriber() 260 if (mPhone.getContext().checkCallingOrSelfPermission( in updateAdnRecordsInEfByIndex() 331 if (mPhone.getContext().checkCallingOrSelfPermission( in getAdnRecordsInEf() 411 if (mPhone.getContext().checkCallingOrSelfPermission( in getAdnRecordsCapacity()
|
/aosp12/packages/apps/Dialer/java/com/android/dialer/preferredsim/impl/ |
H A D | PreferredSimFallbackProvider.java | 162 if (getContext().checkCallingOrSelfPermission(permission.READ_CONTACTS) in checkReadContactsPermission() 169 if (getContext().checkCallingOrSelfPermission(permission.WRITE_CONTACTS) in checkWriteContactsPermission()
|
/aosp12/frameworks/base/services/core/java/com/android/server/compat/ |
H A D | PlatformCompat.java | 400 if (mContext.checkCallingOrSelfPermission(LOG_COMPAT_CHANGE) != PERMISSION_GRANTED) { in checkCompatChangeLogPermission() 410 if (mContext.checkCallingOrSelfPermission(READ_COMPAT_CHANGE_CONFIG) in checkCompatChangeReadPermission() 421 if (mContext.checkCallingOrSelfPermission(OVERRIDE_COMPAT_CHANGE_CONFIG) in checkCompatChangeOverridePermission() 432 if (mContext.checkCallingOrSelfPermission(OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD) in checkCompatChangeOverrideOverridablePermission()
|
/aosp12/frameworks/opt/net/ethernet/java/com/android/server/ethernet/ |
H A D | EthernetServiceImpl.java | 70 return mContext.checkCallingOrSelfPermission( in checkUseRestrictedNetworksPermission() 192 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in dump()
|
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/ |
H A D | Utils.java | 392 return context.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) in hasBluetoothPrivilegedPermission() 774 return context.checkCallingOrSelfPermission(android.Manifest.permission.NETWORK_SETTINGS) in checkCallerHasNetworkSettingsPermission() 784 return context.checkCallingOrSelfPermission( in checkCallerHasNetworkSetupWizardPermission() 795 return context.checkCallingOrSelfPermission( in checkCallerHasScanWithoutLocationPermission() 803 return context.checkCallingOrSelfPermission( in checkCallerHasPrivilegedPermission() 811 return context.checkCallingOrSelfPermission( in checkCallerHasWriteSmsPermission()
|
/aosp12/frameworks/base/services/core/java/com/android/server/oemlock/ |
H A D | OemLockService.java | 260 if (mContext.checkCallingOrSelfPermission(Manifest.permission.READ_OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission() 262 && mContext.checkCallingOrSelfPermission(Manifest.permission.OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission()
|
/aosp12/packages/services/Telephony/tests/src/com/android/ |
H A D | TestContext.java | 183 if (checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { in enforceCallingOrSelfPermission() 199 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in TestContext
|
/aosp12/frameworks/base/services/core/java/com/android/server/media/ |
H A D | MediaServerUtils.java | 33 if (context.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in checkDumpPermission()
|
/aosp12/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | PackageInstallerService.java | 580 && mContext.checkCallingOrSelfPermission(Manifest.permission.USE_INSTALLER_V2) in createSessionInternal() 591 if (mContext.checkCallingOrSelfPermission(Manifest.permission.MANAGE_ROLLBACKS) in createSessionInternal() 593 mContext.checkCallingOrSelfPermission(Manifest.permission.TEST_MANAGE_ROLLBACKS) in createSessionInternal() 628 if (mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES) in createSessionInternal() 641 if (mContext.checkCallingOrSelfPermission( in createSessionInternal() 673 if (mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGE_UPDATES) in createSessionInternal() 675 && mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES) in createSessionInternal() 732 && mContext.checkCallingOrSelfPermission(Manifest.permission in createSessionInternal() 788 if (mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES) in createSessionInternal() 1062 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DELETE_PACKAGES) in uninstall()
|
/aosp12/packages/services/Car/car-lib/src/com/android/car/internal/ |
H A D | CarPermission.java | 44 == mContext.checkCallingOrSelfPermission(mName); in checkGranted()
|
/aosp12/frameworks/base/core/java/com/android/internal/util/ |
H A D | DumpUtils.java | 95 if (context.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in checkDumpPermission() 126 if (context.checkCallingOrSelfPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) in checkUsageStatsPermission()
|
/aosp12/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | Session.java | 126 mCanAddInternalSystemWindow = service.mContext.checkCallingOrSelfPermission( in Session() 128 mCanHideNonSystemOverlayWindows = service.mContext.checkCallingOrSelfPermission( in Session() 130 || service.mContext.checkCallingOrSelfPermission(HIDE_OVERLAY_WINDOWS) in Session() 133 service.mContext.checkCallingOrSelfPermission(SYSTEM_APPLICATION_OVERLAY) in Session() 135 mCanStartTasksFromRecents = service.mContext.checkCallingOrSelfPermission( in Session() 137 mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) in Session()
|
/aosp12/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
H A D | TelecomServiceImplTest.java | 501 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccount() 517 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutModifyPermission() 535 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutModifyPermissionFailure() 553 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutSimSubscriptionPermissionFailure() 572 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testRegisterPhoneAccountWithoutMultiUserPermissionFailure() 610 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testUnregisterPhoneAccount() 624 .when(mContext).checkCallingOrSelfPermission(MODIFY_PHONE_STATE); in testUnregisterPhoneAccountFailure() 1062 doReturn(PackageManager.PERMISSION_DENIED).when(mContext).checkCallingOrSelfPermission( in setupGetLine1NumberTest() 1070 doReturn(PackageManager.PERMISSION_GRANTED).when(mContext).checkCallingOrSelfPermission( in grantPermissionAndAppOp()
|
/aosp12/frameworks/libs/net/common/framework/com/android/net/module/util/ |
H A D | PermissionUtils.java | 40 if (context.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED) { in checkAnyPermissionOf()
|
/aosp12/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/ |
H A D | MockTetheringService.java | 51 return context.checkCallingOrSelfPermission(WRITE_SETTINGS) == PERMISSION_GRANTED; in checkAndNoteWriteSettingsOperation()
|
/aosp12/packages/services/Car/service/src/com/android/car/am/ |
H A D | CarActivityService.java | 71 if (PackageManager.PERMISSION_GRANTED != mContext.checkCallingOrSelfPermission( in setPersistentActivity()
|