Home
last modified time | relevance | path

Searched refs:getGrantedHealthPermissions (Results 1 – 22 of 22) sorted by relevance

/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/api/
DGetGrantedHealthPermissionsUseCaseTest.kt47 verify(healthPermissionManager).getGrantedHealthPermissions("TEST_APP") in invoke_callsHealthPermissionManager()
53 whenever(healthPermissionManager.getGrantedHealthPermissions(any())) in invoke_callsHealthPermissionManager_returnsCorrectList()
57 verify(healthPermissionManager).getGrantedHealthPermissions("TEST_APP") in invoke_callsHealthPermissionManager_returnsCorrectList()
63 whenever(healthPermissionManager.getGrantedHealthPermissions(any())) in invoke_whenHealthPermissionManagerFails_returnsEmptyList()
67 verify(healthPermissionManager).getGrantedHealthPermissions("TEST_APP") in invoke_whenHealthPermissionManagerFails_returnsEmptyList()
DHealthPermissionManagerImplTest.kt47 healthPermissionManager.getGrantedHealthPermissions("packageName") in getGrantedHealthPermissions_callsHealthConnectManager()
49 verify(healthConnectManager, times(1)).getGrantedHealthPermissions("packageName") in getGrantedHealthPermissions_callsHealthConnectManager()
/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/
DHealthConnectManagerTest.java61 healthConnectManager.getGrantedHealthPermissions("com.foo.bar"); in testHealthConnectManager_getNoGrantedHealthPermissions_succeeds()
71 when(mService.getGrantedHealthPermissions(any(), any())) in testHealthConnectManager_getSomeGrantedHealthPermissions_succeeds()
78 healthConnectManager.getGrantedHealthPermissions("com.foo.bar"); in testHealthConnectManager_getSomeGrantedHealthPermissions_succeeds()
91 when(mService.getGrantedHealthPermissions(any(), any())) in testHealthConnectManager_getGrantedHealthPermissionsException_rethrows()
96 () -> healthConnectManager.getGrantedHealthPermissions("com.foo.bar")); in testHealthConnectManager_getGrantedHealthPermissionsException_rethrows()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/datasources/api/
DLoadPotentialPriorityListUseCaseTest.kt125 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
131 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME_2)) in <lambda>()
137 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME_3)) in <lambda>()
156 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
162 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME_2)) in <lambda>()
168 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME_3)) in <lambda>()
/packages/modules/HealthFitness/tests/cts/route/src/android/healthconnect/cts/route/
DExerciseRouteTestHelper.java25 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions;
69 assertThat(getGrantedHealthPermissions(context.getPackageName())) in assertCorrectHealthPermissions()
71 assertThat(getGrantedHealthPermissions(ROUTE_WRITER_APP.getPackageName())) in assertCorrectHealthPermissions()
73 assertThat(getGrantedHealthPermissions(ROUTES_READER_WRITER_APP.getPackageName())) in assertCorrectHealthPermissions()
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/permissions/
DHealthConnectWithManagePermissionsTest.java304 List<String> grantedPerms = getGrantedHealthPermissions(DEFAULT_APP_PACKAGE); in testGetGrantedHealthPermissions_appHasNoPermissionGranted_emptyList()
315 List<String> grantedPerms = getGrantedHealthPermissions(DEFAULT_APP_PACKAGE); in testGetGrantedHealthPermissions_appHasPermissionsGranted_success()
325 getGrantedHealthPermissions(INEXISTENT_APP_PACKAGE); in testGetGrantedHealthPermissions_invalidPackageName_throwsIllegalArgumentException()
331 getGrantedHealthPermissions(/* packageName= */ null); in testGetGrantedHealthPermissions_nullPackageName_throwsNPE()
524 assertThat(getGrantedHealthPermissions(DEFAULT_APP_PACKAGE).size()).isEqualTo(0); in testRevokeAllHealthPermissions_appHasNoPermissionsGranted_success()
536 assertThat(getGrantedHealthPermissions(DEFAULT_APP_PACKAGE).size()).isEqualTo(0); in testRevokeAllHealthPermissions_appHasPermissionsGranted_success()
595 assertThat(getGrantedHealthPermissions(DEFAULT_APP_PACKAGE)).isEmpty(); in testPermissionApis_migrationInProgress_apisBlocked()
722 private List<String> getGrantedHealthPermissions(String packageName) { in getGrantedHealthPermissions() method in HealthConnectWithManagePermissionsTest
726 return mHealthConnectManager.getGrantedHealthPermissions(packageName); in getGrantedHealthPermissions()
DHealthConnectWithoutManagePermissionsTest.java89 mHealthConnectManager.getGrantedHealthPermissions(DEFAULT_APP_PACKAGE); in testGetGrantedHealthPermissions_noManageHealthPermissions_throwsSecurityException()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DRevokedHealthPermissionRule.java19 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions;
39 var grantedPermissions = getGrantedHealthPermissions(mPackageName); in before()
DPermissionHelper.java75 public static List<String> getGrantedHealthPermissions(String pkgName) { in getGrantedHealthPermissions() method in PermissionHelper
165 List<String> healthPerms = getGrantedHealthPermissions(packageName); in revokeAndThenGrantHealthPermissions()
252 Set.copyOf(getGrantedHealthPermissions(packageName)), Set.of(permissions)); in runWithRevokedPermissions()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/api/
DHealthPermissionManagerImpl.kt25 override fun getGrantedHealthPermissions(packageName: String): List<String> { in getGrantedHealthPermissions() method in com.android.healthconnect.controller.permissions.api.HealthPermissionManagerImpl
26 return manager.getGrantedHealthPermissions(packageName) in getGrantedHealthPermissions()
DGetGrantedHealthPermissionsUseCase.kt34 healthPermissionManager.getGrantedHealthPermissions(packageName) in invoke()
DHealthPermissionManager.kt23 fun getGrantedHealthPermissions(packageName: String): List<String> method
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/
DMockedConnectedAppFragmentTest.kt82 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
120 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in exerciseRoutesAlwaysAllow_revokeExercise_lastReadPermission_showsDialog()
172 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in exerciseRoutesAskEveryTime_revokeExercise_lastReadPermission_doesNotShowDialog()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/
DHealthConnectDeviceTest.java35 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions;
700 getGrantedHealthPermissions(APP_A_WITH_READ_WRITE_PERMS.getPackageName()); in testGrantingCorrectPermsPutsTheAppInPriorityList()
726 getGrantedHealthPermissions(APP_A_WITH_READ_WRITE_PERMS.getPackageName()); in testRevokingOnlyOneCorrectPermissionDoesntRemoveAppFromPriorityList()
765 getGrantedHealthPermissions(APP_A_WITH_READ_WRITE_PERMS.getPackageName()); in testRevokingAllCorrectPermissionsRemovesAppFromPriorityList()
828 getGrantedHealthPermissions(APP_A_WITH_READ_WRITE_PERMS.getPackageName()); in testAppWithManageHealthDataPermissionCanUpdatePriority()
1142 getGrantedHealthPermissions(APP_B_WITH_READ_WRITE_PERMS.getPackageName()); in testToVerifyNoPermissionChangeLog()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/di/
DFakeHealthPermissionManager.kt36 override fun getGrantedHealthPermissions(packageName: String): List<String> { in getGrantedHealthPermissions() method in com.android.healthconnect.controller.tests.utils.di.FakeHealthPermissionManager
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/request/
DRequestPermissionViewModelTest.kt541 assertThat(permissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in requestFitnessPermissions_updatesPermissionState()
562 assertThat(permissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in requestAdditionalPermissions_updatesPermissionState()
589 assertThat(permissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in requestAdditionalPermissions_skipsExerciseRoutePermission_updatesPermissionState()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DHealthConnectPermissionHelper.java184 public List<String> getGrantedHealthPermissions( in getGrantedHealthPermissions() method in HealthConnectPermissionHelper
247 return !getGrantedHealthPermissions(packageName, user).isEmpty(); in hasGrantedHealthPermissions()
/packages/modules/HealthFitness/framework/java/android/health/connect/aidl/
DIHealthConnectService.aidl54 List<String> getGrantedHealthPermissions(String packageName, in UserHandle user); in getGrantedHealthPermissions() method
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/datatypehelpers/
DHealthDataCategoryPriorityHelperTest.java249 when(mHealthConnectPermissionHelper.getGrantedHealthPermissions( in testMaybeRemoveAppFromPriorityList_ifWritePermissionsForApp_doesNotRemoveApp()
273 when(mHealthConnectPermissionHelper.getGrantedHealthPermissions( in testNewMaybeRemoveAppFromPriorityList_ifDataForApp_doesNotRemoveApp()
299 when(mHealthConnectPermissionHelper.getGrantedHealthPermissions( in testNewMaybeRemoveAppFromPriorityList_ifNoDataForApp_removesApp()
328 when(mHealthConnectPermissionHelper.getGrantedHealthPermissions( in testOldMaybeRemoveAppFromPriorityList_ifNoWritePermissionsForApp_removesApp()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/storage/datatypehelpers/
DHealthDataCategoryPriorityHelper.java160 permissionHelper.getGrantedHealthPermissions(packageName, userHandle); in maybeRemoveAppFromPriorityList()
/packages/modules/HealthFitness/framework/java/android/health/connect/
DHealthConnectManager.java449 public List<String> getGrantedHealthPermissions(@NonNull String packageName) { in getGrantedHealthPermissions() method in HealthConnectManager
451 return mService.getGrantedHealthPermissions(packageName, mContext.getUser()); in getGrantedHealthPermissions()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectServiceImpl.java296 public List<String> getGrantedHealthPermissions( in getGrantedHealthPermissions() method in HealthConnectServiceImpl
302 mPermissionHelper.getGrantedHealthPermissions(packageName, user); in getGrantedHealthPermissions()