Home
last modified time | relevance | path

Searched refs:assertPermission (Results 1 – 24 of 24) sorted by relevance

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/picker/
DActionHandlerTest.java332 assertPermission(result, Intent.FLAG_GRANT_READ_URI_PERMISSION, false); in testPickDocument_SetsCorrectResultAndFinishes_ActionPickCopyDestination()
333 assertPermission(result, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, false); in testPickDocument_SetsCorrectResultAndFinishes_ActionPickCopyDestination()
334 assertPermission(result, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, false); in testPickDocument_SetsCorrectResultAndFinishes_ActionPickCopyDestination()
335 assertPermission(result, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, false); in testPickDocument_SetsCorrectResultAndFinishes_ActionPickCopyDestination()
360 assertPermission(result, Intent.FLAG_GRANT_READ_URI_PERMISSION, true); in testPickDocument_SetsCorrectResultAndFinishes_ActionOpenTree()
361 assertPermission(result, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, true); in testPickDocument_SetsCorrectResultAndFinishes_ActionOpenTree()
362 assertPermission(result, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, true); in testPickDocument_SetsCorrectResultAndFinishes_ActionOpenTree()
363 assertPermission(result, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, true); in testPickDocument_SetsCorrectResultAndFinishes_ActionOpenTree()
391 assertPermission(result, Intent.FLAG_GRANT_READ_URI_PERMISSION, true); in testSaveDocument_SetsCorrectResultAndFinishes()
392 assertPermission(result, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, true); in testSaveDocument_SetsCorrectResultAndFinishes()
[all …]
/packages/services/Car/car-lib/src/android/car/oem/
DOemCarService.java70 assertPermission();
79 assertPermission();
88 assertPermission();
97 assertPermission();
113 assertPermission();
119 assertPermission();
135 private void assertPermission() {
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DDevicePermissionsTest.kt123 assertPermission(Manifest.permission.CAMERA, PERMISSION_GRANTED, virtualDeviceContext) in testDeviceAwareRuntimePermissionGrantIsInherited()
130 assertPermission(NON_DEVICE_AWARE_PERMISSION, PERMISSION_GRANTED, virtualDeviceContext) in testNonDeviceAwareRuntimePermissionGrantIsInherited()
147 assertPermission(NON_DEVICE_AWARE_PERMISSION, PERMISSION_GRANTED, virtualDeviceContext) in testNonDeviceAwareRuntimePermissionIsRevokedForDefaultDevice()
150 assertPermission(NON_DEVICE_AWARE_PERMISSION, PERMISSION_DENIED, defaultDeviceContext) in testNonDeviceAwareRuntimePermissionIsRevokedForDefaultDevice()
155 assertPermission(Manifest.permission.INTERNET, PERMISSION_GRANTED, virtualDeviceContext) in testNormalPermissionGrantIsInherited()
160 assertPermission(CUSTOM_SIGNATURE_PERMISSION, PERMISSION_GRANTED, virtualDeviceContext) in testSignaturePermissionGrantIsInherited()
182 assertPermission(DEVICE_AWARE_PERMISSION, PERMISSION_DENIED, virtualDeviceContext) in testOneTimePermissionIsRevoked()
196 assertPermission(DEVICE_AWARE_PERMISSION, PERMISSION_DENIED, virtualDeviceContext) in testRevokeSelfPermissionOnKill()
523 assertPermission(permissionName, PERMISSION_GRANTED, context) in grantPermissionAndAssertGranted()
532 assertPermission(permissionName, PERMISSION_DENIED, context) in revokePermissionAndAssertDenied()
[all …]
/packages/services/Car/service/src/com/android/car/evs/
DCarEvsService.java528 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_MONITOR_CAR_EVS_STATUS); in registerStatusListener()
547 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_MONITOR_CAR_EVS_STATUS); in unregisterStatusListener()
564 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_REQUEST_CAR_EVS_ACTIVITY); in startActivity()
588 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_REQUEST_CAR_EVS_ACTIVITY); in stopActivity()
612 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_CAR_EVS_CAMERA); in startVideoStream()
644 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_CAR_EVS_CAMERA); in stopVideoStream()
678 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_CAR_EVS_CAMERA); in stopVideoStreamFrom()
713 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_CAR_EVS_CAMERA); in returnFrameBuffer()
731 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_MONITOR_CAR_EVS_STATUS); in getCurrentStatus()
754 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_EVS_ACTIVITY); in generateSessionToken()
[all …]
/packages/services/Car/service/src/com/android/car/watchdog/
DCarWatchdogService.java31 import static com.android.car.CarServiceUtils.assertPermission;
400 assertPermission(mContext, Car.PERMISSION_USE_CAR_WATCHDOG); in registerClient()
410 assertPermission(mContext, Car.PERMISSION_USE_CAR_WATCHDOG); in unregisterClient()
419 assertPermission(mContext, Car.PERMISSION_USE_CAR_WATCHDOG); in tellClientAlive()
443 assertPermission(mContext, Car.PERMISSION_COLLECT_CAR_WATCHDOG_METRICS); in getAllResourceOveruseStats()
455 assertPermission(mContext, Car.PERMISSION_COLLECT_CAR_WATCHDOG_METRICS); in getResourceOveruseStatsForUserPackage()
488 assertPermission(mContext, Car.PERMISSION_COLLECT_CAR_WATCHDOG_METRICS); in addResourceOveruseListenerForSystem()
498 assertPermission(mContext, Car.PERMISSION_COLLECT_CAR_WATCHDOG_METRICS); in removeResourceOveruseListenerForSystem()
506 assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_WATCHDOG_CONFIG); in setKillablePackageAsUser()
517 assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_WATCHDOG_CONFIG); in getPackageKillableStatesAsUser()
[all …]
/packages/services/Car/service/src/com/android/car/
DCarServiceUtils.java601 assertPermission(context, Car.PERMISSION_MOCK_VEHICLE_HAL); in assertVehicleHalMockPermission()
606 assertPermission(context, Car.PERMISSION_CAR_NAVIGATION_MANAGER); in assertNavigationManagerPermission()
611 assertPermission(context, Car.PERMISSION_CAR_INSTRUMENT_CLUSTER_CONTROL); in assertClusterManagerPermission()
616 assertPermission(context, Car.PERMISSION_CAR_POWER); in assertPowerPermission()
621 assertPermission(context, Car.PERMISSION_CAR_PROJECTION); in assertProjectionPermission()
626 assertPermission(context, Car.PERMISSION_CAR_PROJECTION_STATUS); in assertProjectionStatusPermission()
638 assertPermission(context, Car.PERMISSION_CAR_DRIVING_STATE); in assertDrivingStatePermission()
653 assertPermission(context, Car.PERMISSION_VMS_PUBLISHER); in assertVmsPublisherPermission()
658 assertPermission(context, Car.PERMISSION_VMS_SUBSCRIBER); in assertVmsSubscriberPermission()
662 public static void assertPermission(Context context, String permission) { in assertPermission() method in CarServiceUtils
DCarFeatureController.java380 assertPermission(); in enableFeature()
410 assertPermission(); in disableFeature()
445 assertPermission(); in setAvailableExperimentalFeatureList()
459 assertPermission(); in getAllEnabledFeatures()
465 assertPermission(); in getAllPendingDisabledFeatures()
473 assertPermission(); in getAllPendingEnabledFeatures()
617 private void assertPermission() { in assertPermission() method in CarFeatureController
618 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_FEATURES); in assertPermission()
DCarTestService.java95 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE); in stopCarService()
116 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE); in startCarService()
122 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE); in dumpVhal()
135 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE); in hasAidlVhal()
DOccupantAwarenessService.java250 CarServiceUtils.assertPermission(mContext, in getCapabilityForRole()
292 CarServiceUtils.assertPermission(mContext, in registerEventListener()
323 CarServiceUtils.assertPermission(mContext, in unregisterEventListener()
DCarMediaService.java29 import static com.android.car.CarServiceUtils.assertPermission;
795 assertPermission(mContext, in setMediaSource()
811 assertPermission(mContext, android.Manifest.permission.MEDIA_CONTENT_CONTROL); in getMediaSource()
836 assertPermission(mContext, in registerMediaSourceListener()
852 assertPermission(mContext, in unregisterMediaSourceListener()
865 assertPermission(mContext, in getLastMediaSources()
905 assertPermission(mContext, in isIndependentPlaybackConfig()
927 assertPermission(mContext, in setIndependentPlaybackConfig()
DCarUxRestrictionsManagerService.java367 CarServiceUtils.assertPermission(mContext, in getConfigs()
590 CarServiceUtils.assertPermission(mContext, in saveUxRestrictionsConfigurationForNextBoot()
601 CarServiceUtils.assertPermission(mContext, in getStagedConfigs()
627 CarServiceUtils.assertPermission(mContext, in setRestrictionMode()
649 CarServiceUtils.assertPermission(mContext, in getRestrictionMode()
DCarDrivingStateService.java277 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_APP_BLOCKING); in injectDrivingState()
DICarImpl.java646 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE); in getCarService()
655 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_STORAGE_MONITORING); in getCarService()
/packages/services/Car/car-lib/src/android/car/app/
DCarTaskViewController.java113 assertPermission(Manifest.permission.INJECT_EVENTS); in createControlledRemoteCarTaskView()
114 assertPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW); in createControlledRemoteCarTaskView()
136 assertPermission(Car.PERMISSION_CONTROL_CAR_APP_LAUNCH); in createRemoteCarRootTaskView()
209 private void assertPermission(String permission) { in assertPermission() method in CarTaskViewController
/packages/services/Car/service/src/com/android/car/occupantconnection/
DCarOccupantConnectionService.java26 import static com.android.car.CarServiceUtils.assertPermission;
445 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in registerReceiver()
472 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in unregisterReceiver()
503 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in requestConnection()
567 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in cancelConnection()
587 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in sendPayload()
612 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in disconnect()
631 assertPermission(mContext, Car.PERMISSION_MANAGE_OCCUPANT_CONNECTION); in isConnected()
DCarRemoteDeviceService.java37 import static com.android.car.CarServiceUtils.assertPermission;
351 assertPermission(mContext, Car.PERMISSION_MANAGE_REMOTE_DEVICE); in registerStateCallback()
371 assertPermission(mContext, Car.PERMISSION_MANAGE_REMOTE_DEVICE); in unregisterStateCallback()
392 assertPermission(mContext, Car.PERMISSION_MANAGE_REMOTE_DEVICE); in getEndpointPackageInfo()
406 assertPermission(mContext, Car.PERMISSION_MANAGE_REMOTE_DEVICE); in setOccupantZonePower()
416 assertPermission(mContext, Car.PERMISSION_MANAGE_REMOTE_DEVICE); in isOccupantZonePowerOn()
/packages/services/Car/service/src/com/android/car/os/
DCarPerformanceService.java94 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_MANAGE_THREAD_PRIORITY); in setThreadPriority()
115 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_MANAGE_THREAD_PRIORITY); in getThreadPriority()
/packages/services/Car/service/src/com/android/car/remoteaccess/
DCarRemoteAccessService.java623 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_REMOTE_ACCESS); in addCarRemoteTaskClient()
699 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_USE_REMOTE_ACCESS); in removeCarRemoteTaskClient()
775 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in addServerlessRemoteTaskClient()
805 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in removeServerlessRemoteTaskClient()
818 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in isTaskScheduleSupported()
857 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in scheduleTask()
899 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in unscheduleTask()
916 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in unscheduleAllTasks()
932 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in isTaskScheduled()
949 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_REMOTE_ACCESS); in getAllPendingScheduledTasks()
[all …]
/packages/services/Car/service/src/com/android/car/cluster/
DClusterNavigationService.java85 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_NAVIGATION_MANAGER); in onNavigationStateChanged()
98 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_NAVIGATION_MANAGER); in getInstrumentClusterInfo()
/packages/services/Car/car-lib/src/android/car/hardware/power/
DCarPowerManager.java585 assertPermission(Car.PERMISSION_READ_CAR_POWER_POLICY); in addPowerPolicyListener()
624 assertPermission(Car.PERMISSION_READ_CAR_POWER_POLICY); in removePowerPolicyListener()
847 private void assertPermission(String permission) { in assertPermission() method in CarPowerManager
/packages/services/Car/service/src/com/android/car/power/
DCarPowerManagementService.java1899 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_POWER); in notifyUserActivity()
1968 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_POWER); in registerListener()
1976 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_SHUTDOWN_PROCESS); in registerListenerWithCompletion()
1992 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_POWER); in requestShutdownOnNextSuspend()
2000 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_SHUTDOWN_PROCESS); in finished()
2007 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_POWER); in scheduleNextWakeupTime()
2031 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CAR_POWER); in getPowerState()
2043 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_READ_CAR_POWER_POLICY); in getCurrentPowerPolicy()
2059 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_POWER_POLICY); in applyPowerPolicy()
2078 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_CONTROL_CAR_POWER_POLICY); in setPowerPolicyGroup()
[all …]
/packages/services/Car/experimental/service/src/com/android/experimentalcar/
DDriverDistractionExperimentalFeatureService.java713 IExperimentalCarImpl.assertPermission(mContext, in getLastDistractionEvent()
723 IExperimentalCarImpl.assertPermission(mContext, in addDriverDistractionChangeListener()
744 IExperimentalCarImpl.assertPermission(mContext, in removeDriverDistractionChangeListener()
DIExperimentalCarImpl.java209 public static void assertPermission(Context context, String permission) { in assertPermission() method in IExperimentalCarImpl
/packages/services/Car/service/src/com/android/car/wifi/
DCarWifiService.java244 CarServiceUtils.assertPermission(mContext, Car.PERMISSION_READ_PERSIST_TETHERING_SETTINGS); in canControlPersistTetheringSettings()