Home
last modified time | relevance | path

Searched refs:checkCallingOrSelfPermission (Results 1 – 25 of 86) sorted by relevance

1234

/frameworks/base/tests/net/java/android/net/
DNetworkStackTest.java52 when(mCtx.checkCallingOrSelfPermission(eq(NETWORK_STACK))).thenReturn(PERMISSION_GRANTED); in testCheckNetworkStackPermission()
53 when(mCtx.checkCallingOrSelfPermission(eq(PERMISSION_MAINLINE_NETWORK_STACK))) in testCheckNetworkStackPermission()
58 when(mCtx.checkCallingOrSelfPermission(eq(NETWORK_STACK))).thenReturn(PERMISSION_DENIED); in testCheckNetworkStackPermission()
59 when(mCtx.checkCallingOrSelfPermission(eq(PERMISSION_MAINLINE_NETWORK_STACK))) in testCheckNetworkStackPermission()
64 when(mCtx.checkCallingOrSelfPermission(any())).thenReturn(PERMISSION_DENIED); in testCheckNetworkStackPermission()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkScoreServiceTest.java354 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_notActiveScorer_noRequestNetworkScoresPermission()
367 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_activeScorer_noRequestNetworkScoresPermission()
388 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testClearScores_notActiveScorer_hasRequestNetworkScoresPermission()
400 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testSetActiveScorer_noScoreNetworksPermission()
402 when(mContext.checkCallingOrSelfPermission(permission.SCORE_NETWORKS)) in testSetActiveScorer_noScoreNetworksPermission()
415 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testSetActiveScorer_requestNetworkScoresPermission()
424 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testDisableScoring_notActiveScorer_noRequestNetworkScoresPermission()
438 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testDisableScoring_activeScorer_noRequestNetworkScoresPermission()
459 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testGetAllValidScorer_requestNetworkScoresPermission()
552 when(mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES)) in testGetActiveScorerPackage_missingRequiredPermissions()
[all …]
/frameworks/base/services/core/java/com/android/server/
DConsumerIrService.java72 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.TRANSMIT_IR) in transmit()
104 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.TRANSMIT_IR) in getCarrierFrequencies()
DSystemUpdateManagerService.java115 if (mContext.checkCallingOrSelfPermission(Manifest.permission.READ_SYSTEM_UPDATE_INFO) in retrieveSystemUpdateInfo()
117 && mContext.checkCallingOrSelfPermission(Manifest.permission.RECOVERY) in retrieveSystemUpdateInfo()
DDynamicSystemService.java106 if (mContext.checkCallingOrSelfPermission( in checkPermission()
DHardwarePropertiesManagerService.java168 && mContext.checkCallingOrSelfPermission(Manifest.permission.DEVICE_POWER) in enforceHardwarePropertiesRetrievalAllowed()
DPersistentDataBlockService.java203 if (mContext.checkCallingOrSelfPermission(Manifest.permission.READ_OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission()
205 && mContext.checkCallingOrSelfPermission(Manifest.permission.OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission()
DNetworkScoreService.java743 if (mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES) in enforceSystemOrHasScoreNetworks()
745 && mContext.checkCallingOrSelfPermission(permission.SCORE_NETWORKS) in enforceSystemOrHasScoreNetworks()
753 if (mContext.checkCallingOrSelfPermission(permission.REQUEST_NETWORK_SCORES) in enforceSystemOrIsActiveScorer()
DSensorPrivacyService.java126 if (mContext.checkCallingOrSelfPermission( in enforceSensorPrivacyPermission()
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetServiceImpl.java73 return mContext.checkCallingOrSelfPermission( in checkUseRestrictedNetworksPermission()
172 if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in dump()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DIccPhoneBookInterfaceManager.java169 if (mPhone.getContext().checkCallingOrSelfPermission( in updateAdnRecordsInEfBySearch()
221 if (mPhone.getContext().checkCallingOrSelfPermission( in updateAdnRecordsInEfByIndex()
287 if (mPhone.getContext().checkCallingOrSelfPermission( in getAdnRecordsInEf()
/frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/
DTimeDetectorServiceTest.java94 when(mMockContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)) in testDump()
99 verify(mMockContext).checkCallingOrSelfPermission(eq(android.Manifest.permission.DUMP)); in testDump()
/frameworks/base/services/core/java/com/android/server/oemlock/
DOemLockService.java260 if (mContext.checkCallingOrSelfPermission(Manifest.permission.READ_OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission()
262 && mContext.checkCallingOrSelfPermission(Manifest.permission.OEM_UNLOCK_STATE) in enforceOemUnlockReadPermission()
/frameworks/base/core/java/com/android/internal/util/
DDumpUtils.java95 if (context.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) in checkDumpPermission()
126 if (context.checkCallingOrSelfPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) in checkUsageStatsPermission()
/frameworks/base/core/java/android/net/
DNetworkStack.java88 if (context.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED) { in checkAnyPermissionOf()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java76 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in MockLockSettingsContext
/frameworks/base/telephony/java/com/android/internal/telephony/
DTelephonyPermissions.java527 if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) == in enforceCallingOrSelfModifyPermissionOrCarrierPrivilege()
544 if (context.checkCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE) in enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege()
564 if (context.checkCallingOrSelfPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) in enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege()
/frameworks/base/media/java/android/media/audiopolicy/
DAudioPolicy.java506 == checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING); in policyReadyToUse()
535 private @PackageManager.PermissionResult int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in AudioPolicy
537 return mContext.checkCallingOrSelfPermission(permission); in checkCallingOrSelfPermission()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsAccess.java124 if (hasAppOpsPermission || context.checkCallingOrSelfPermission( in checkAccessLevel()
/frameworks/base/services/core/java/com/android/server/wm/
DSession.java97 mCanAddInternalSystemWindow = service.mContext.checkCallingOrSelfPermission( in Session()
99 mCanHideNonSystemOverlayWindows = service.mContext.checkCallingOrSelfPermission( in Session()
101 mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) in Session()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DKeyguardService.java67 if (getBaseContext().checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { in checkPermission()
/frameworks/base/tests/testables/src/android/testing/
DTestableContext.java316 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() method in TestableContext
320 return super.checkCallingOrSelfPermission(permission); in checkCallingOrSelfPermission()
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsAccessTest.java188 when(mContext.checkCallingOrSelfPermission(permission.READ_NETWORK_USAGE_HISTORY)) in setHasReadHistoryPermission()
/frameworks/base/core/java/android/view/accessibility/
DAccessibilityManager.java384 || context.checkCallingOrSelfPermission( in getInstance()
387 || context.checkCallingOrSelfPermission( in getInstance()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DTrampolineTest.java1302 when(mContextMock.checkCallingOrSelfPermission( in dump_callerDoesNotHavePermission_ignored()
1314 when(mContextMock.checkCallingOrSelfPermission( in dump_calledBeforeInitialize_ignored()
1325 when(mContextMock.checkCallingOrSelfPermission( in dump_callerHasPermission_forwarded()

1234