/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/api/ |
D | GetGrantedHealthPermissionsUseCaseTest.kt | 47 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()
|
D | HealthPermissionManagerImplTest.kt | 47 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/ |
D | HealthConnectManagerTest.java | 61 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/ |
D | LoadPotentialPriorityListUseCaseTest.kt | 125 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/ |
D | ExerciseRouteTestHelper.java | 25 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/ |
D | HealthConnectWithManagePermissionsTest.java | 304 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()
|
D | HealthConnectWithoutManagePermissionsTest.java | 89 mHealthConnectManager.getGrantedHealthPermissions(DEFAULT_APP_PACKAGE); in testGetGrantedHealthPermissions_noManageHealthPermissions_throwsSecurityException()
|
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/ |
D | RevokedHealthPermissionRule.java | 19 import static android.healthconnect.cts.utils.PermissionHelper.getGrantedHealthPermissions; 39 var grantedPermissions = getGrantedHealthPermissions(mPackageName); in before()
|
D | PermissionHelper.java | 75 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/ |
D | HealthPermissionManagerImpl.kt | 25 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()
|
D | GetGrantedHealthPermissionsUseCase.kt | 34 healthPermissionManager.getGrantedHealthPermissions(packageName) in invoke()
|
D | HealthPermissionManager.kt | 23 fun getGrantedHealthPermissions(packageName: String): List<String> method
|
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/ |
D | MockedConnectedAppFragmentTest.kt | 82 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/ |
D | HealthConnectDeviceTest.java | 35 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/ |
D | FakeHealthPermissionManager.kt | 36 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/ |
D | RequestPermissionViewModelTest.kt | 541 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/ |
D | HealthConnectPermissionHelper.java | 184 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/ |
D | IHealthConnectService.aidl | 54 List<String> getGrantedHealthPermissions(String packageName, in UserHandle user); in getGrantedHealthPermissions() method
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/datatypehelpers/ |
D | HealthDataCategoryPriorityHelperTest.java | 249 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/ |
D | HealthDataCategoryPriorityHelper.java | 160 permissionHelper.getGrantedHealthPermissions(packageName, userHandle); in maybeRemoveAppFromPriorityList()
|
/packages/modules/HealthFitness/framework/java/android/health/connect/ |
D | HealthConnectManager.java | 449 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/ |
D | HealthConnectServiceImpl.java | 296 public List<String> getGrantedHealthPermissions( in getGrantedHealthPermissions() method in HealthConnectServiceImpl 302 mPermissionHelper.getGrantedHealthPermissions(packageName, user); in getGrantedHealthPermissions()
|