Home
last modified time | relevance | path

Searched refs:grantedPermissions (Results 1 – 25 of 31) sorted by relevance

12

/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/app/
DAppPermissionViewModel.kt79 val grantedPermissions: LiveData<Set<FitnessPermission>> in <lambda>() constant in com.android.healthconnect.controller.permissions.app.AppPermissionViewModel
85 postValue(isAllPermissionsGranted(appPermissions, grantedPermissions)) in <lambda>()
88 postValue(isAllPermissionsGranted(appPermissions, grantedPermissions)) in <lambda>()
94 addSource(_grantedPermissions) { grantedPermissions -> in <lambda>() method
95 postValue(grantedPermissions.isNotEmpty()) in <lambda>()
178 val grantedPermissions = in <lambda>() constant
180 permissionsList = grantedPermissions in <lambda>()
184 grantedPermissions in <lambda>()
188 grantedPermissions in <lambda>()
225 val grantedPermissions = _grantedPermissions.value.orEmpty().toMutableSet() in <lambda>() constant
[all …]
DLoadAppPermissionsStatusUseCase.kt40 val grantedPermissions = loadGrantedHealthPermissionsUseCase(packageName) in <lambda>() constant
43 permission, grantedPermissions.contains(permission.toString())) in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/di/
DFakeHealthPermissionManager.kt25 private val grantedPermissions = mutableMapOf<String, MutableList<String>>() constant in com.android.healthconnect.controller.tests.utils.di.FakeHealthPermissionManager
33 grantedPermissions[packageName] = permissions.toMutableList() in setGrantedPermissionsForTest()
37 return grantedPermissions.getOrDefault(packageName, emptyList()) in getGrantedHealthPermissions()
56 val permissions = grantedPermissions.getOrDefault(packageName, mutableListOf()) in grantHealthPermission()
58 grantedPermissions[packageName] = permissions in grantHealthPermission()
62 val permissions = grantedPermissions.getOrDefault(packageName, mutableListOf()) in revokeHealthPermission()
64 grantedPermissions[packageName] = permissions in revokeHealthPermission()
68 grantedPermissions[packageName] = mutableListOf() in revokeAllHealthPermissions()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/additionalaccess/
DLoadExerciseRoutePermissionUseCase.kt44 val grantedPermissions = getGrantedHealthPermissionsUseCase(input) in execute() constant
51 READ_EXERCISE_ROUTES, grantedPermissions, appPermissions, permissionFlags), in execute()
54 READ_EXERCISE, grantedPermissions, appPermissions, permissionFlags)) in execute()
59 grantedPermissions: List<String>, in getPermissionState()
64 if (grantedPermissions.contains(permission)) { in getPermissionState()
DAdditionalAccessViewModel.kt113 val grantedPermissions = getGrantedHealthPermissionsUseCase.invoke(packageName) in <lambda>() constant
115 grantedPermissions.any { permission -> isDataTypeReadPermission(permission) } in <lambda>()
124 grantedPermissions.contains( in <lambda>()
136 grantedPermissions.contains( in <lambda>()
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/
DRestrictedPermissionsTest.java273 final Set<String> grantedPermissions = new ArraySet<>(1); in testSomeRestrictedPermissionsGrantedAtInstall() local
274 grantedPermissions.add(Manifest.permission.SEND_SMS); in testSomeRestrictedPermissionsGrantedAtInstall()
275 grantedPermissions.add(Manifest.permission.READ_CALL_LOG); in testSomeRestrictedPermissionsGrantedAtInstall()
278 installRestrictedPermissionUserApp(null /*whitelistedPermissions*/, grantedPermissions); in testSomeRestrictedPermissionsGrantedAtInstall()
284 assertRestrictedPermissionGranted(grantedPermissions); in testSomeRestrictedPermissionsGrantedAtInstall()
291 final Set<String> grantedPermissions = new ArraySet<>(); in testCanGrantSoftRestrictedNotWhitelistedPermissions() local
292 grantedPermissions.add(Manifest.permission.READ_EXTERNAL_STORAGE); in testCanGrantSoftRestrictedNotWhitelistedPermissions()
293 grantedPermissions.add(permission.WRITE_EXTERNAL_STORAGE); in testCanGrantSoftRestrictedNotWhitelistedPermissions()
295 installApp(APK_USES_STORAGE_DEFAULT_29, Collections.emptySet(), grantedPermissions); in testCanGrantSoftRestrictedNotWhitelistedPermissions()
297 assertRestrictedPermissionGranted(grantedPermissions); in testCanGrantSoftRestrictedNotWhitelistedPermissions()
[all …]
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/request/
DRequestPermissionViewModel.kt315 val grantedPermissions = grantedPermissionsLiveData.value.orEmpty() in <lambda>() constant
316 return if (permissionsList.isEmpty() || grantedPermissions.isEmpty()) { in <lambda>()
319 permissionsList.size == grantedPermissions.size in <lambda>()
334 val grantedPermissions = getGrantedHealthPermissionsUseCase.invoke(packageName) in <lambda>() constant
338 grantedPermissions.any { permission -> isDataTypeReadPermission(permission) } in <lambda>()
340 grantedPermissions.any { permission -> isHistoryReadPermission(permission) } in <lambda>()
360 .onEach { permission -> addToRequestedPermissions(grantedPermissions, permission) } in <lambda>()
362 .filterNot { permission -> grantedPermissions.contains(permission.toString()) } in <lambda>()
399 grantedPermissions: List<String>, in <lambda>()
402 val isPermissionGranted = grantedPermissions.contains(permission.toString()) in <lambda>()
DMedicalPermissionsFragment.kt148 viewModel.grantedMedicalPermissions.observe(viewLifecycleOwner) { grantedPermissions -> in <lambda>() method
149 getAllowButton().isEnabled = grantedPermissions.isNotEmpty() in <lambda>()
DFitnessPermissionsFragment.kt144 viewModel.grantedFitnessPermissions.observe(viewLifecycleOwner) { grantedPermissions -> in <lambda>() method
145 getAllowButton().isEnabled = grantedPermissions.isNotEmpty() in <lambda>()
DAdditionalPermissionsFragment.kt104 grantedPermissions -> in <lambda>() method
105 getAllowButton().isEnabled = grantedPermissions.isNotEmpty() in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/
DAppPermissionViewModelTest.kt162 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
197 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
215 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
233 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
250 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
309 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
373 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
414 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
450 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
488 appPermissionViewModel.grantedPermissions.observeForever(grantedPermissionsObserver) in <lambda>()
[all …]
DConnectedAppFragmentTest.kt113 whenever(viewModel.grantedPermissions).then { in <lambda>()
180 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(permission)) } in <lambda>()
209 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(permission)) } in <lambda>()
240 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
280 whenever(viewModel.grantedPermissions).then { in <lambda>()
365 whenever(viewModel.grantedPermissions).then { in <lambda>()
389 whenever(viewModel.grantedPermissions).then { in <lambda>()
411 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(permission)) } in <lambda>()
437 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(permission)) } in <lambda>()
468 whenever(viewModel.grantedPermissions).then { in <lambda>()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/livedatatypes/
DLightPackageInfo.kt89 val grantedPermissions: List<String> in <lambda>() constant in com.android.permissioncontroller.permission.model.livedatatypes.LightPackageInfo
91 val grantedPermissions = mutableListOf<String>() in <lambda>() constant in com.android.permissioncontroller.permission.model.livedatatypes.LightPackageInfo
96 grantedPermissions.add(requestedPermissions[i]) in <lambda>()
99 return grantedPermissions in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/route/
DExerciseRouteViewModel.kt87 val grantedPermissions = getGrantedHealthPermissionsUseCase(packageName) in isRouteReadOrWritePermissionGranted() constant
89 return grantedPermissions.any { it in routePermissions } in isRouteReadOrWritePermissionGranted()
93 val grantedPermissions = getGrantedHealthPermissionsUseCase(packageName) in isReadRoutesPermissionGranted() constant
94 return grantedPermissions.contains(READ_EXERCISE_ROUTES) in isReadRoutesPermissionGranted()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DMedicalDataPermissionEnforcer.java88 Set<String> grantedPermissions = new ArraySet<>(); in getGrantedMedicalPermissionsForPreflight() local
93 grantedPermissions.add(permission); in getGrantedMedicalPermissionsForPreflight()
96 return grantedPermissions; in getGrantedMedicalPermissionsForPreflight()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/settings/
DSettingsManageAppPermissionsFragmentTest.kt110 whenever(viewModel.grantedPermissions).then { in <lambda>()
167 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
190 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(readPermission)) } in <lambda>()
209 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
233 whenever(viewModel.grantedPermissions).then { in <lambda>()
271 whenever(viewModel.grantedPermissions).then { in <lambda>()
303 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
332 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
441 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
491 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
[all …]
DSettingsActivityTest.kt80 whenever(viewModel.grantedPermissions).then { in <lambda>()
111 whenever(viewModel.grantedPermissions).then { MutableLiveData(setOf(writePermission)) } in <lambda>()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DRevokedHealthPermissionRule.java39 var grantedPermissions = getGrantedHealthPermissions(mPackageName); in before() local
41 mIsPermissionGranted = grantedPermissions.contains(mPermission); in before()
DPermissionHelper.java250 var grantedPermissions = in runWithRevokedPermissions() local
255 grantedPermissions.forEach( in runWithRevokedPermissions()
259 grantedPermissions.forEach( in runWithRevokedPermissions()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/connectedapps/
DLoadHealthPermissionApps.kt56 val grantedPermissions = loadGrantedHealthPermissionsUseCase(packageName) in <lambda>() constant
58 if (grantedPermissions.isNotEmpty()) { in <lambda>()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/
DFullStoragePermissionAppsLiveData.kt128 MANAGE_EXTERNAL_STORAGE in packageInfo.grantedPermissions) in getFullStorageStateForPackage()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v33/
DReviewPermissionDecisionsViewModel.kt90 lightPackageInfo.grantedPermissions.map { in loadDataAndPostValue()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/storage/datatypehelpers/
DHealthDataCategoryPriorityHelper.java159 final List<String> grantedPermissions = in maybeRemoveAppFromPriorityList() local
162 if (grantedPermissions.contains(permission)) { in maybeRemoveAppFromPriorityList()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/
DAutoRevokePermissions.kt86 if (pkg.grantedPermissions.isEmpty()) { in <lambda>()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsActor.java550 ContentResolver resolver, Set<String> grantedPermissions, in RestrictionMockContext() argument
555 mGrantedPermissions = grantedPermissions; in RestrictionMockContext()

12