Home
last modified time | relevance | path

Searched refs:enforceCallingOrSelfPermission (Results 1 – 25 of 126) sorted by relevance

123456

/frameworks/base/services/tests/servicestests/src/com/android/server/recoverysystem/
DRecoverySystemServiceTest.java80 doNothing().when(mContext).enforceCallingOrSelfPermission( in clearBcb_success()
93 doNothing().when(mContext).enforceCallingOrSelfPermission( in clearBcb_uncrypt_failure()
106 doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission( in clearBcb_noPerm()
113 doNothing().when(mContext).enforceCallingOrSelfPermission( in setupBcb_success()
127 doNothing().when(mContext).enforceCallingOrSelfPermission( in setupBcb_uncrypt_failure()
141 doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission( in setupBcb_noPerm()
148 doNothing().when(mContext).enforceCallingOrSelfPermission( in rebootRecoveryWithCommand_success()
163 doNothing().when(mContext).enforceCallingOrSelfPermission( in rebootRecoveryWithCommand_failure()
178 doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission( in rebootRecoveryWithCommand_noPerm()
185 doNothing().when(mContext).enforceCallingOrSelfPermission( in uncrypt_success()
/frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/
DTimeDetectorServiceTest.java117 .when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestManualTime_withoutPermission()
124 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestManualTime_withoutPermission()
132 doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestManualTime()
138 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestManualTime()
149 .when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestNetworkTime_withoutPermission()
156 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestNetworkTime_withoutPermission()
163 doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestNetworkTime()
169 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestNetworkTime()
/frameworks/base/services/core/java/com/android/server/adb/
DAdbService.java282 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in allowDebugging()
291 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in denyDebugging()
299 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in clearDebuggingKeys()
334 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in allowWirelessDebugging()
343 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in denyWirelessDebugging()
351 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in getPairedDevices()
360 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in unpairDevice()
369 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in enablePairingByPairingCode()
377 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in enablePairingByQrCode()
387 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_DEBUGGING, null); in disablePairing()
[all …]
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbService.java314 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.ACCESS_MTP, null); in getControlFd()
322 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in setDevicePackage()
338 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in setAccessoryPackage()
408 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in grantDevicePermission()
421 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in grantAccessoryPermission()
436 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in hasDefaults()
452 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in clearDefaults()
466 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in setCurrentFunctions()
484 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in getCurrentFunctions()
491 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USB, null); in setScreenUnlockedFunctions()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/timezonedetector/
DTimeZoneDetectorServiceTest.java81 .when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestManualTimeZone_withoutPermission()
88 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestManualTimeZone_withoutPermission()
96 doNothing().when(mMockContext).enforceCallingOrSelfPermission(anyString(), any()); in testSuggestManualTimeZone()
102 verify(mMockContext).enforceCallingOrSelfPermission( in testSuggestManualTimeZone()
/frameworks/base/services/core/java/com/android/server/
DSerialService.java38 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SERIAL_PORT, null); in getSerialPorts()
53 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SERIAL_PORT, null); in openSerialPort()
DUpdateLockService.java95 mContext.enforceCallingOrSelfPermission(PERMISSION, "acquireUpdateLock"); in acquireUpdateLock()
105 mContext.enforceCallingOrSelfPermission(PERMISSION, "releaseUpdateLock"); in releaseUpdateLock()
/frameworks/base/services/core/java/com/android/server/content/
DContentService.java590 mContext.enforceCallingOrSelfPermission( in syncAsUser()
675 mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, in cancelRequest()
762 mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS, in getSyncAutomaticallyAsUser()
789 mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, in setSyncAutomaticallyAsUser()
820 mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, in addPeriodicSync()
850 mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, in removePeriodicSync()
878 mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS, in getPeriodicSyncs()
904 mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS, in getIsSyncableAsUser()
936 mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, in setIsSyncableAsUser()
968 mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS, in getMasterSyncAutomaticallyAsUser()
[all …]
/frameworks/base/services/core/java/com/android/server/role/
DRoleManagerService.java462 getContext().enforceCallingOrSelfPermission(Manifest.permission.MANAGE_ROLE_HOLDERS, in getRoleHoldersAsUser()
483 getContext().enforceCallingOrSelfPermission(Manifest.permission.MANAGE_ROLE_HOLDERS, in addRoleHolderAsUser()
503 getContext().enforceCallingOrSelfPermission(Manifest.permission.MANAGE_ROLE_HOLDERS, in removeRoleHolderAsUser()
523 getContext().enforceCallingOrSelfPermission(Manifest.permission.MANAGE_ROLE_HOLDERS, in clearRoleHoldersAsUser()
540 getContext().enforceCallingOrSelfPermission(Manifest.permission.OBSERVE_ROLE_HOLDERS, in addOnRoleHoldersChangedListenerAsUser()
558 getContext().enforceCallingOrSelfPermission(Manifest.permission.OBSERVE_ROLE_HOLDERS, in removeOnRoleHoldersChangedListenerAsUser()
572 getContext().enforceCallingOrSelfPermission( in setRoleNamesFromController()
585 getContext().enforceCallingOrSelfPermission( in addRoleHolderFromController()
599 getContext().enforceCallingOrSelfPermission( in removeRoleHolderFromController()
612 getContext().enforceCallingOrSelfPermission( in getHeldRolesFromController()
/frameworks/base/tests/testables/tests/src/android/testing/
DTestablePermissionsTest.java67 mContext.enforceCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS, ""); in testEnforceNoException()
74 mContext.enforceCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS, ""); in testEnforceWithException()
/frameworks/base/services/core/java/com/android/server/incident/
DIncidentCompanionService.java316 getContext().enforceCallingOrSelfPermission( in enforceRequestAuthorizationPermission()
325 getContext().enforceCallingOrSelfPermission( in enforceAuthorizePermission()
344 getContext().enforceCallingOrSelfPermission( in enforceAccessReportsPermissions()
346 getContext().enforceCallingOrSelfPermission( in enforceAccessReportsPermissions()
/frameworks/base/services/core/java/com/android/server/lights/
DLightsService.java92 getContext().enforceCallingOrSelfPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS, in getLights()
116 getContext().enforceCallingOrSelfPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS, in setLightStates()
135 getContext().enforceCallingOrSelfPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS, in getLightState()
149 getContext().enforceCallingOrSelfPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS, in openSession()
167 getContext().enforceCallingOrSelfPermission(Manifest.permission.CONTROL_DEVICE_LIGHTS, in closeSession()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayManagerService.java1794 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in startWifiDisplayScan()
1808 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in stopWifiDisplayScan()
1825 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in connectWifiDisplay()
1856 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in renameWifiDisplay()
1872 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in forgetWifiDisplay()
1885 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in pauseWifiDisplay()
1898 mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY, in resumeWifiDisplay()
1924 mContext.enforceCallingOrSelfPermission( in requestColorMode()
2078 mContext.enforceCallingOrSelfPermission( in getBrightnessEvents()
2110 mContext.enforceCallingOrSelfPermission( in getAmbientBrightnessStats()
[all …]
/frameworks/base/telephony/java/android/telephony/
DAnomalyReporter.java122 context.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, in initialize()
163 sContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, "Requires DUMP"); in dump()
/frameworks/base/services/core/java/com/android/server/timedetector/
DTimeDetectorService.java141 mContext.enforceCallingOrSelfPermission( in enforceSuggestManualTimePermission()
147 mContext.enforceCallingOrSelfPermission( in enforceSuggestNetworkTimePermission()
/frameworks/base/services/core/java/com/android/server/power/
DThermalManagerService.java311 getContext().enforceCallingOrSelfPermission(
331 getContext().enforceCallingOrSelfPermission(
350 getContext().enforceCallingOrSelfPermission(
364 getContext().enforceCallingOrSelfPermission(
379 getContext().enforceCallingOrSelfPermission(
437 getContext().enforceCallingOrSelfPermission(
452 getContext().enforceCallingOrSelfPermission(
DPowerManagerService.java4303 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER, null); in powerHint()
4318 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WAKE_LOCK, null); in acquireWakeLock()
4320 mContext.enforceCallingOrSelfPermission( in acquireWakeLock()
4324 mContext.enforceCallingOrSelfPermission( in acquireWakeLock()
4346 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WAKE_LOCK, null); in releaseWakeLock()
4377 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WAKE_LOCK, null); in updateWakeLockWorkSource()
4379 mContext.enforceCallingOrSelfPermission( in updateWakeLockWorkSource()
4448 mContext.enforceCallingOrSelfPermission( in wakeUp()
4466 mContext.enforceCallingOrSelfPermission( in goToSleep()
4484 mContext.enforceCallingOrSelfPermission( in nap()
[all …]
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetServiceImpl.java58 mContext.enforceCallingOrSelfPermission( in enforceAccessPermission()
64 mContext.enforceCallingOrSelfPermission( in enforceUseRestrictedNetworksPermission()
/frameworks/base/services/usage/java/com/android/server/usage/
DStorageStatsService.java149 mContext.enforceCallingOrSelfPermission( in enforcePermission()
251 mContext.enforceCallingOrSelfPermission( in queryStatsForPackage()
303 mContext.enforceCallingOrSelfPermission( in queryStatsForUid()
352 mContext.enforceCallingOrSelfPermission( in queryStatsForUser()
379 mContext.enforceCallingOrSelfPermission( in queryExternalStatsForUser()
/frameworks/base/services/backup/java/com/android/server/backup/
DBackupPasswordManager.java85 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in hasBackupPassword()
113 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in setBackupPassword()
DUserBackupManagerService.java1651 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in getAvailableRestoreToken()
2533 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "backupNow"); in backupNow()
2862 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in setBackupEnabled()
2929 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in setAutoRestore()
2948 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in isBackupEnabled()
2955 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in getCurrentTransport()
2968 mContext.enforceCallingOrSelfPermission( in getCurrentTransportComponent()
2982 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in listAllTransports()
2990 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, in listAllTransportComponents()
3045 mContext.enforceCallingOrSelfPermission( in updateTransportAttributes()
[all …]
/frameworks/base/services/core/java/com/android/server/oemlock/
DOemLockService.java248 mContext.enforceCallingOrSelfPermission( in enforceManageCarrierOemUnlockPermission()
254 mContext.enforceCallingOrSelfPermission( in enforceManageUserOemUnlockPermission()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiServiceImplTest.java839 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.CHANGE_WIFI_STATE), in testSetWifiEnableWithoutChangeWifiStatePermission()
979 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.CHANGE_WIFI_STATE), in testSetWifiDisabledWithoutChangeWifiStatePermission()
1115 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.ACCESS_WIFI_STATE), in testGetWifiApEnabledPermissionDenied()
1220 doThrow(new SecurityException()).when(mContext).enforceCallingOrSelfPermission( in testStartSoftApWithoutPermissionThrowsException()
1256 doThrow(new SecurityException()).when(mContext).enforceCallingOrSelfPermission( in testStopSoftApWithoutPermissionThrowsException()
1563 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.CHANGE_WIFI_STATE), in testStartLocalOnlyHotspotThrowsSecurityExceptionWithoutCorrectPermission()
1718 verify(mContext, never()).enforceCallingOrSelfPermission( in testStopLocalOnlyHotspotTriggersSoftApStopWithOneRegisteredRequest()
2627 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testStartWatchLocalOnlyHotspotNotApprovedCaller()
2648 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testStopWatchLocalOnlyHotspotNotApprovedCaller()
2863 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS), in testRestoreBackupDataNotApprovedCaller()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/restore/
DActiveRestoreSession.java81 mBackupManagerService.getContext().enforceCallingOrSelfPermission( in getAvailableRestoreSets()
136 mBackupManagerService.getContext().enforceCallingOrSelfPermission( in restoreAll()
197 mBackupManagerService.getContext().enforceCallingOrSelfPermission( in restorePackages()
/frameworks/base/services/print/java/com/android/server/print/
DPrintManagerService.java317 mContext.enforceCallingOrSelfPermission( in getPrintServices()
372 mContext.enforceCallingOrSelfPermission( in getPrintServiceRecommendations()
596 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRINT_SERVICES, in addPrintServicesChangeListener()
620 mContext.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRINT_SERVICES, in removePrintServicesChangeListener()
645 mContext.enforceCallingOrSelfPermission( in addPrintServiceRecommendationsChangeListener()
669 mContext.enforceCallingOrSelfPermission( in removePrintServiceRecommendationsChangeListener()

123456