Home
last modified time | relevance | path

Searched refs:TEST_APP_PACKAGE_NAME (Results 1 – 25 of 72) sorted by relevance

123

/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ui/permissions/
DAdditionalPermissionsRequestUITest.kt26 import android.healthconnect.cts.lib.UiTestUtils.TEST_APP_PACKAGE_NAME
54 revokePermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_HISTORY) in setup()
56 context, TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_IN_BACKGROUND) in setup()
62 revokePermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_HISTORY) in tearDown()
64 context, TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_IN_BACKGROUND) in tearDown()
65 revokePermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, READ_HEIGHT) in tearDown()
71 grantPermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, READ_HEIGHT) in requestAdditionalPermissions_showsBothAdditionalPermissions_grantsBoth()
73 packageName = TEST_APP_PACKAGE_NAME, permissions = permissions) { in requestAdditionalPermissions_showsBothAdditionalPermissions_grantsBoth()
79 assertPermGrantedForApp(TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_HISTORY) in requestAdditionalPermissions_showsBothAdditionalPermissions_grantsBoth()
80 assertPermGrantedForApp(TEST_APP_PACKAGE_NAME, READ_HEALTH_DATA_IN_BACKGROUND) in requestAdditionalPermissions_showsBothAdditionalPermissions_grantsBoth()
[all …]
DRequestHealthPermissionUITest.kt22 import android.healthconnect.cts.lib.UiTestUtils.TEST_APP_PACKAGE_NAME
46 context, TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in showsAppName_showsRequestedPermissions()
48 context, TEST_APP_PACKAGE_NAME, HealthPermissions.WRITE_BODY_FAT) in showsAppName_showsRequestedPermissions()
50 packageName = TEST_APP_PACKAGE_NAME, in showsAppName_showsRequestedPermissions()
62 context, TEST_APP_PACKAGE_NAME, HealthPermissions.WRITE_BODY_FAT) in requestGrantedPermissions_doesNotShowGrantedPermissions()
64 context, TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in requestGrantedPermissions_doesNotShowGrantedPermissions()
67 packageName = TEST_APP_PACKAGE_NAME, in requestGrantedPermissions_doesNotShowGrantedPermissions()
77 context, TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in grantPermission_grantsOnlyRequestedPermission()
79 context, TEST_APP_PACKAGE_NAME, HealthPermissions.WRITE_BODY_FAT) in grantPermission_grantsOnlyRequestedPermission()
81 packageName = TEST_APP_PACKAGE_NAME, in grantPermission_grantsOnlyRequestedPermission()
[all …]
DManageAppHealthPermissionUITest.kt24 import android.healthconnect.cts.lib.UiTestUtils.TEST_APP_PACKAGE_NAME
70 revokePermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in grantPermission_updatesAppPermissions()
77 assertPermGrantedForApp(TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in grantPermission_updatesAppPermissions()
83 grantPermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in revokePermission_updatesAppPermissions()
86 assertPermGrantedForApp(TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in revokePermission_updatesAppPermissions()
91 assertPermNotGrantedForApp(TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in revokePermission_updatesAppPermissions()
97 grantPermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, READ_HEIGHT) in revokeAllPermissions_revokesAllAppPermissions()
98 grantPermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, WRITE_HEIGHT) in revokeAllPermissions_revokesAllAppPermissions()
99 grantPermissionViaPackageManager(context, TEST_APP_PACKAGE_NAME, WRITE_BODY_FAT) in revokeAllPermissions_revokesAllAppPermissions()
108 assertPermNotGrantedForApp(TEST_APP_PACKAGE_NAME, READ_HEIGHT) in revokeAllPermissions_revokesAllAppPermissions()
[all …]
DManageHealthPermissionsUITest.kt22 import android.healthconnect.cts.lib.UiTestUtils.TEST_APP_PACKAGE_NAME
67 context, TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in revokeAllPermissions_revokeAllConnectedAppsPermission()
76 assertPermNotGrantedForApp(TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in revokeAllPermissions_revokeAllConnectedAppsPermission()
94 context, TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEIGHT) in tearDown()
96 context, TEST_APP_PACKAGE_NAME, HealthPermissions.WRITE_HEIGHT) in tearDown()
98 context, TEST_APP_PACKAGE_NAME, HealthPermissions.WRITE_BODY_FAT) in tearDown()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/request/
DRequestPermissionViewModelTest.kt52 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
104 permissionManager.revokeAllHealthPermissions(TEST_APP_PACKAGE_NAME) in setup()
117 whenever(loadAccessDateUseCase.invoke(eq(TEST_APP_PACKAGE_NAME))).thenReturn(NOW) in setup()
131 viewModel.init(TEST_APP_PACKAGE_NAME, permissions) in <lambda>()
137 assertThat(testObserver.getLastValue().packageName).isEqualTo(TEST_APP_PACKAGE_NAME) in <lambda>()
149 viewModel.init(TEST_APP_PACKAGE_NAME, permissions) in <lambda>()
185 TEST_APP_PACKAGE_NAME, in <lambda>()
198 TEST_APP_PACKAGE_NAME, in <lambda>()
214 TEST_APP_PACKAGE_NAME, in <lambda>()
242 TEST_APP_PACKAGE_NAME, in <lambda>()
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/additionalaccess/
DAdditionalAccessViewModelTest.kt38 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
115 whenever(loadDeclaredHealthPermissionUseCase.invoke(TEST_APP_PACKAGE_NAME)) in setup()
129 whenever(getAdditionalPermissionUseCase.invoke(TEST_APP_PACKAGE_NAME)) in setup()
150 whenever(loadAccessDateUseCase.invoke(TEST_APP_PACKAGE_NAME)).thenReturn(accessDate) in loadAccessDate_returnsCorrectDate()
151 val result = additionalAccessViewModel.loadAccessDate(TEST_APP_PACKAGE_NAME) in loadAccessDate_returnsCorrectDate()
157 whenever(getGrantedHealthPermissionsUseCase.invoke(TEST_APP_PACKAGE_NAME)) in <lambda>()
164 additionalAccessViewModel.loadAdditionalAccessPreferences(TEST_APP_PACKAGE_NAME) in <lambda>()
196 whenever(getGrantedHealthPermissionsUseCase.invoke(TEST_APP_PACKAGE_NAME)) in <lambda>()
202 additionalAccessViewModel.loadAdditionalAccessPreferences(TEST_APP_PACKAGE_NAME) in <lambda>()
235 whenever(getGrantedHealthPermissionsUseCase.invoke(TEST_APP_PACKAGE_NAME)) in loadAdditionalAccessPreferences_backgroundReadNotEnabled_doesNotReturnBackgroundRead()
[all …]
DLoadExerciseRoutePermissionUseCaseTest.kt34 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
69 getGrantedHealthPermissionsUseCase.updateData(TEST_APP_PACKAGE_NAME, emptyList()) in setup()
70 whenever(loadDeclaredHealthPermissionUseCase.invoke(safeEq(TEST_APP_PACKAGE_NAME))).then { in setup()
83 TEST_APP_PACKAGE_NAME, listOf(READ_EXERCISE_ROUTES)) in <lambda>()
85 val state = useCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
96 whenever(loadDeclaredHealthPermissionUseCase.invoke(safeEq(TEST_APP_PACKAGE_NAME))).then { in <lambda>()
100 val state = useCase.invoke(safeEq(TEST_APP_PACKAGE_NAME)) in <lambda>()
114 val state = useCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
127 val state = useCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
141 val state = useCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
[all …]
DExerciseRoutesPermissionDialogFragmentTest.kt43 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
69 TEST_APP_PACKAGE_NAME,
89 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in showDialog_permissionStateGranted_preselectCorrectView()
103 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in showDialog_permissionStateDeclared_preselectCorrectView()
115 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in showDialog_permissionStateRevoked_preselectCorrectView()
123 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in onOptionSelected_withAllowAll_callsViewModelWithGranted()
128 .updateExerciseRouteState(safeEq(TEST_APP_PACKAGE_NAME), safeEq(ALWAYS_ALLOW)) in onOptionSelected_withAllowAll_callsViewModelWithGranted()
134 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in onOptionSelected_withAskEveryTime_callsViewModelWithDeclared()
139 .updateExerciseRouteState(safeEq(TEST_APP_PACKAGE_NAME), safeEq(ASK_EVERY_TIME)) in onOptionSelected_withAskEveryTime_callsViewModelWithDeclared()
148 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in onOptionSelected_withRevoke_callsViewModelWithRevoked()
[all …]
DGetAdditionalPermissionUseCaseTest.kt24 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
50 whenever(healthPermissionReader.getAdditionalPermissions(TEST_APP_PACKAGE_NAME)).then { in setup()
57 useCase.invoke(TEST_APP_PACKAGE_NAME) in execute_callsGetHealthPermissions()
59 verify(healthPermissionReader).getAdditionalPermissions(safeEq(TEST_APP_PACKAGE_NAME)) in execute_callsGetHealthPermissions()
64 whenever(healthPermissionReader.getAdditionalPermissions(TEST_APP_PACKAGE_NAME)).then { in execute_returnsAdditionalPermissions()
68 assertThat(useCase.invoke(TEST_APP_PACKAGE_NAME)).isEqualTo(listOf(READ_EXERCISE_ROUTES)) in execute_returnsAdditionalPermissions()
DAdditionalAccessFragmentTest.kt54 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME in <lambda>()
99 TEST_APP_PACKAGE_NAME, in <lambda>()
118 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
126 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
128 verify(additionalAccessViewModel).loadAdditionalAccessPreferences(eq(TEST_APP_PACKAGE_NAME)) in <lambda>()
139 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
157 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
171 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
189 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
230 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/
DAppPermissionViewModelTest.kt38 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
141 whenever(loadAccessDateUseCase.invoke(TEST_APP_PACKAGE_NAME)).thenReturn(accessDate) in loadsCorrectAccessDate()
142 val result = appPermissionViewModel.loadAccessDate(TEST_APP_PACKAGE_NAME) in loadsCorrectAccessDate()
157 TEST_APP_PACKAGE_NAME, listOf(readExercisePermission.toString())) in <lambda>()
164 appPermissionViewModel.loadPermissionsForPackage(TEST_APP_PACKAGE_NAME) in <lambda>()
192 TEST_APP_PACKAGE_NAME, listOf(readExercisePermission.toString())) in <lambda>()
199 appPermissionViewModel.loadPermissionsForPackage(TEST_APP_PACKAGE_NAME) in <lambda>()
219 TEST_APP_PACKAGE_NAME, readExercisePermission, true) in <lambda>()
237 TEST_APP_PACKAGE_NAME, readExercisePermission, true) in <lambda>()
252 appPermissionViewModel.loadPermissionsForPackage(TEST_APP_PACKAGE_NAME) in <lambda>()
[all …]
DMockedConnectedAppFragmentTest.kt37 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
82 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
92 Intent.EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
109 .revokeHealthPermission(TEST_APP_PACKAGE_NAME, HealthPermissions.READ_EXERCISE) in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
111 .revokeHealthPermission(TEST_APP_PACKAGE_NAME, HealthPermissions.READ_EXERCISE_ROUTES) in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
114 TEST_APP_PACKAGE_NAME, HealthPermissions.READ_HEALTH_DATA_HISTORY) in exerciseRoutesAlwaysAllow_revokeExercise_notLastReadPermission_showsDialog()
120 whenever(healthPermissionManager.getGrantedHealthPermissions(TEST_APP_PACKAGE_NAME)) in exerciseRoutesAlwaysAllow_revokeExercise_lastReadPermission_showsDialog()
137 TEST_APP_PACKAGE_NAME, HealthPermissions.READ_EXERCISE_ROUTES)) in exerciseRoutesAlwaysAllow_revokeExercise_lastReadPermission_showsDialog()
145 Intent.EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, in exerciseRoutesAlwaysAllow_revokeExercise_lastReadPermission_showsDialog()
162 .revokeHealthPermission(TEST_APP_PACKAGE_NAME, HealthPermissions.READ_EXERCISE) in exerciseRoutesAlwaysAllow_revokeExercise_lastReadPermission_showsDialog()
[all …]
DLoadHealthPermissionAppsTest.kt26 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
86 .thenReturn(listOf(TEST_APP_PACKAGE_NAME, TEST_APP_PACKAGE_NAME_2)) in <lambda>()
88 TEST_APP_PACKAGE_NAME, listOf("PERM_1", "PERM_2")) in <lambda>()
101 val testAppMetadata = appInfoReader.getAppMetadata(TEST_APP_PACKAGE_NAME) in <lambda>()
116 .thenReturn(listOf(TEST_APP_PACKAGE_NAME)) in <lambda>()
118 TEST_APP_PACKAGE_NAME, listOf("PERM_1", "PERM_2")) in <lambda>()
119 val testAppMetadata = appInfoReader.getAppMetadata(TEST_APP_PACKAGE_NAME) in <lambda>()
146 .thenReturn(listOf(TEST_APP_PACKAGE_NAME)) in appsWithOldHealthPermissions_withoutNewPermissions_correctlyCategorisedAsNeedsUpdate()
147 loadGrantedHealthPermissionsUseCase.updateData(TEST_APP_PACKAGE_NAME, listOf()) in appsWithOldHealthPermissions_withoutNewPermissions_correctlyCategorisedAsNeedsUpdate()
148 val testAppMetadata = appInfoReader.getAppMetadata(TEST_APP_PACKAGE_NAME) in appsWithOldHealthPermissions_withoutNewPermissions_correctlyCategorisedAsNeedsUpdate()
[all …]
DConnectedAppFragmentTest.kt56 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME in <lambda>()
126 TEST_APP_PACKAGE_NAME, in <lambda>()
158 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
185 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
214 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
245 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
288 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
318 EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
342 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
370 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME, EXTRA_APP_NAME to TEST_APP_NAME)) in <lambda>()
[all …]
DLoadAppPermissionsStatusUseCaseTest.kt24 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
61 TEST_APP_PACKAGE_NAME, listOf(readExercisePermission.toString())) in <lambda>()
62 whenever(healthPermissionReader.getValidHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
65 val result = loadAppPermissionsStatusUseCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
81 TEST_APP_PACKAGE_NAME, in <lambda>()
83 whenever(healthPermissionReader.getValidHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
86 val result = loadAppPermissionsStatusUseCase.invoke(TEST_APP_PACKAGE_NAME) in <lambda>()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DAndroidManifestConfigParserTest.java38 private static final String TEST_APP_PACKAGE_NAME = "com.android.adservices.servicecoretest"; field in AndroidManifestConfigParserTest
49 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_valid()
62 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_attrOrderChange_valid()
76 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_withPropertyNameRef_valid()
89 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_missingProperty()
102 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_missingPropertyInsideApplication()
115 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_missingPropertyDueToNoNameAttr()
127 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_missingPropertyDueToIncorrectName()
140 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_missingPropertyDueToIncorrectDepth()
152 mContext.getPackageManager().getResourcesForApplication(TEST_APP_PACKAGE_NAME); in testGetAdServicesConfigResourceId_invalidPropertyDueToMissingResourceAttr()
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissions/connectedapps/settings/
DSettingsActivityTest.kt41 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME in <lambda>()
79 TEST_APP_PACKAGE_NAME, listOf()) in <lambda>()
100 TEST_APP_PACKAGE_NAME, in <lambda>()
119 bundle.putString(EXTRA_PACKAGE_NAME, TEST_APP_PACKAGE_NAME) in <lambda>()
122 whenever(viewModel.isPackageSupported(TEST_APP_PACKAGE_NAME)).then { false } in <lambda>()
123 whenever(viewModel.shouldNavigateToAppPermissionsFragment(TEST_APP_PACKAGE_NAME)).then { in <lambda>()
137 bundle.putString(EXTRA_PACKAGE_NAME, TEST_APP_PACKAGE_NAME) in <lambda>()
140 whenever(viewModel.isPackageSupported(TEST_APP_PACKAGE_NAME)).then { true } in <lambda>()
141 whenever(viewModel.shouldNavigateToAppPermissionsFragment(TEST_APP_PACKAGE_NAME)).then { in <lambda>()
154 bundle.putString(EXTRA_PACKAGE_NAME, TEST_APP_PACKAGE_NAME) in <lambda>()
[all …]
DSettingsManageAppPermissionsFragmentTest.kt55 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME in <lambda>()
122 TEST_APP_PACKAGE_NAME, in <lambda>()
171 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
194 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
213 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
236 whenever(viewModel.isPackageSupported(TEST_APP_PACKAGE_NAME)).then { false } in <lambda>()
240 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
274 whenever(viewModel.isPackageSupported(TEST_APP_PACKAGE_NAME)).then { false } in <lambda>()
278 bundleOf(EXTRA_PACKAGE_NAME to TEST_APP_PACKAGE_NAME)) in <lambda>()
304 whenever(viewModel.isPackageSupported(TEST_APP_PACKAGE_NAME)).then { true } in <lambda>()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/
DTopicsServiceImplTest.java139 private static final String TEST_APP_PACKAGE_NAME = "com.android.adservices.servicecoretest"; field in TopicsServiceImplTest
233 .setAppPackageName(TEST_APP_PACKAGE_NAME) in setup()
242 when(mPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(MY_UID); in setup()
246 doReturn(MY_UID).when(pmWithPerm).getPackageUid(TEST_APP_PACKAGE_NAME, 0); in setup()
313 .setAppPackageName(TEST_APP_PACKAGE_NAME) in checkEmptySdkNameRequests()
332 new GetTopicsParam.Builder().setAppPackageName(TEST_APP_PACKAGE_NAME).build(); in checkNoSdkNameRequests()
353 .when(() -> AllowLists.getAppSignatureHash(mSpyContext, TEST_APP_PACKAGE_NAME)); in checkSignatureAllowList_successAllowList()
385 .setAppPackageName(TEST_APP_PACKAGE_NAME) in checkThrottler_rateLimitReached_forAppPackageName()
439 when(mPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(appCallingUid); in testEnforceForeground_sandboxCaller()
471 when(mPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(uid); in testEnforceForeground_disableEnforcing()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/adid/src/com/android/adservices/service/adid/
DAdIdServiceImplTest.java91 private static final String TEST_APP_PACKAGE_NAME = "com.android.adservices.servicecoretest"; field in AdIdServiceImplTest
124 .setAppPackageName(TEST_APP_PACKAGE_NAME) in setup()
130 when(mMockPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)) in setup()
133 setupPermissions(TEST_APP_PACKAGE_NAME, ACCESS_ADSERVICES_AD_ID); in setup()
162 .setAppPackageName(TEST_APP_PACKAGE_NAME) in checkThrottler_rateLimitReached_forAppPackageName()
193 when(mMockPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(appCallingUid); in testEnforceForeground_sandboxCaller()
221 when(mMockPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(uid); in testEnforceForeground_disableEnforcing()
234 setupPermissions(TEST_APP_PACKAGE_NAME); in checkAppNoPermission()
244 setupPermissions(TEST_APP_PACKAGE_NAME, ACCESS_ADSERVICES_AD_ID); in checkSdkNoPermission()
290 when(mMockPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)) in testGetAdId_enforceCallingPackage_logCallingPackageNotFound()
[all …]
/packages/modules/AdServices/sdksandbox/tests/cts/hostside/src/com/android/sdksandbox/cts/host/
DCtsSdkSandboxStorageHostTest.java36 private static final String TEST_APP_PACKAGE_NAME = "com.android.sdksandbox.cts.app"; field in CtsSdkSandboxStorageHostTest
50 TEST_APP_PACKAGE_NAME, in runPhase()
51 TEST_APP_PACKAGE_NAME + ".CtsSdkSandboxStorageTestApp", in runPhase()
59 uninstallPackage(TEST_APP_PACKAGE_NAME); in setUp()
64 uninstallPackage(TEST_APP_PACKAGE_NAME); in tearDown()
DSdkSandboxMediaHostTest.java37 private static final String TEST_APP_PACKAGE_NAME = "com.android.sdksandbox.cts.app"; field in SdkSandboxMediaHostTest
52 TEST_APP_PACKAGE_NAME, in runPhase()
53 TEST_APP_PACKAGE_NAME + ".CtsSdkSandboxMediaTestApp", in runPhase()
61 uninstallPackage(TEST_APP_PACKAGE_NAME); in setUp()
66 uninstallPackage(TEST_APP_PACKAGE_NAME); in tearDown()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DPermissionActivityTest.java83 private static final String TEST_APP_PACKAGE_NAME = field in PermissionActivityTest
126 mTestAppUid = getContext().getPackageManager().getPackageUid(TEST_APP_PACKAGE_NAME, 0); in setUp()
150 TEST_APP_PACKAGE_NAME, null, VERB_FAVORITE)).isFalse(); in testShouldShowActionDialog_favorite_false() local
156 TEST_APP_PACKAGE_NAME, null, VERB_UNFAVORITE)).isFalse(); in testShouldShowActionDialog_unfavorite_false() local
168 mTestAppUid, enableAppOpsList, disableAppOpsList, TEST_APP_PACKAGE_NAME); in testShouldShowActionDialog_noRESAndMES_true()
171 TEST_APP_PACKAGE_NAME, null, VERB_TRASH)).isTrue(); in testShouldShowActionDialog_noRESAndMES_true() local
284 mTestAppUid, enableAppOpsList, disableAppOpsList, TEST_APP_PACKAGE_NAME); in testShouldShowActionDialog_noMANAGE_MEDIA_true()
287 TEST_APP_PACKAGE_NAME, null, VERB_TRASH)).isTrue(); in testShouldShowActionDialog_noMANAGE_MEDIA_true() local
331 mTestAppUid, enableAppOpsList, disableAppOpsList, TEST_APP_PACKAGE_NAME); in testShouldShowActionDialog_hasMMWithRES_false()
334 TEST_APP_PACKAGE_NAME, null, VERB_TRASH)).isFalse(); in testShouldShowActionDialog_hasMMWithRES_false() local
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/shared/
DHealthPermissionReaderTest.kt15 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME
48 assertThat(permissionReader.getValidHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
61 assertThat(permissionReader.getValidHealthPermissions(TEST_APP_PACKAGE_NAME)) in getValidHealthPermissions_returnsDataTypeAndAdditionalPermissions()
77 assertThat(permissionReader.getValidHealthPermissions(TEST_APP_PACKAGE_NAME)) in <lambda>()
92 assertThat(permissionReader.getDeclaredHealthPermissions(TEST_APP_PACKAGE_NAME)) in getDeclaredHealthPermissions_returnsAllPermissions()
109 assertThat(permissionReader.getDeclaredHealthPermissions(TEST_APP_PACKAGE_NAME)) in getDeclaredHealthPermissions_medicalFlagOn_returnsAllPermissions()
126 assertThat(permissionReader.isRationaleIntentDeclared(TEST_APP_PACKAGE_NAME)).isTrue() in isRationalIntentDeclared_withIntent_returnsTrue()
138 .containsAtLeast(TEST_APP_PACKAGE_NAME, TEST_APP_PACKAGE_NAME_2) in <lambda>()
168 .containsNoneOf(TEST_APP_PACKAGE_NAME, TEST_APP_PACKAGE_NAME_2) in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/permissiontypes/api/
DFilterPermissionTypesUseCaseTest.kt20 import com.android.healthconnect.controller.tests.utils.TEST_APP_PACKAGE_NAME in <lambda>()
62 listOf(getDataOrigin(TEST_APP_PACKAGE_NAME))), in <lambda>()
74 usecase.invoke(HealthDataCategory.ACTIVITY, TEST_APP_PACKAGE_NAME) in <lambda>()
96 listOf(getDataOrigin(TEST_APP_PACKAGE_NAME))), in <lambda>()
101 listOf(getDataOrigin(TEST_APP_PACKAGE_NAME))), in <lambda>()
106 listOf(getDataOrigin(TEST_APP_PACKAGE_NAME))), in <lambda>()
111 listOf(getDataOrigin(TEST_APP_PACKAGE_NAME)))) in <lambda>()
117 val result = usecase.invoke(HealthDataCategory.ACTIVITY, TEST_APP_PACKAGE_NAME) in <lambda>()

123