Home
last modified time | relevance | path

Searched refs:PACKAGE_NAME (Results 1 – 25 of 262) sorted by relevance

1234567891011

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DAppManifestConfigHelperTest.java84 private static final String PACKAGE_NAME = "TEST_PACKAGE"; field in AppManifestConfigHelperTest
122 mockGetPropertySucceeds(PACKAGE_NAME, AD_SERVICES_CONFIG_PROPERTY, RESOURCE_ID); in testIsAllowedAttributionAccess_sPlus()
126 assertWithMessage("isAllowedAttributionAccess(ctx, %s, %s)", PACKAGE_NAME, ENROLLMENT_ID) in testIsAllowedAttributionAccess_sPlus()
129 PACKAGE_NAME, ENROLLMENT_ID)) in testIsAllowedAttributionAccess_sPlus()
138 mockGetAssetSucceeds(PACKAGE_NAME, RESOURCE_ID); in testIsAllowedAttributionAccess_rMinus()
142 assertWithMessage("isAllowedAttributionAccess(ctx, %s, %s)", PACKAGE_NAME, ENROLLMENT_ID) in testIsAllowedAttributionAccess_rMinus()
145 PACKAGE_NAME, ENROLLMENT_ID)) in testIsAllowedAttributionAccess_rMinus()
154 mockGetPropertySucceeds(PACKAGE_NAME, AD_SERVICES_CONFIG_PROPERTY, RESOURCE_ID); in testIsAllowedCustomAudiencesAccess_sPlus()
159 "isAllowedCustomAudiencesAccess(ctx, %s, %s)", PACKAGE_NAME, ENROLLMENT_ID) in testIsAllowedCustomAudiencesAccess_sPlus()
162 PACKAGE_NAME, ENROLLMENT_ID)) in testIsAllowedCustomAudiencesAccess_sPlus()
[all …]
DFledgeAuthorizationFilterTest.java86 private static final String PACKAGE_NAME = "pkg_name"; field in FledgeAuthorizationFilterTest
119 .thenReturn(new String[] {PACKAGE_NAME, PACKAGE_NAME_OTHER}); in testAssertCallingPackageName_isCallingPackageName()
121 mChecker.assertCallingPackageName(PACKAGE_NAME, UID, API_NAME_LOGGING_ID); in testAssertCallingPackageName_isCallingPackageName()
147 PACKAGE_NAME, UID, API_NAME_LOGGING_ID)); in testAssertCallingPackageName_isNotCallingPackageName_throwSecurityException()
156 eq(PACKAGE_NAME), in testAssertCallingPackageName_isNotCallingPackageName_throwSecurityException()
171 PACKAGE_NAME, UID, API_NAME_LOGGING_ID)); in testAssertCallingPackageName_packageNotExist_throwSecurityException()
180 eq(PACKAGE_NAME), in testAssertCallingPackageName_packageNotExist_throwSecurityException()
532 when(AppManifestConfigHelper.isAllowedCustomAudiencesAccess(PACKAGE_NAME, ENROLLMENT_ID)) in testAssertAdTechHasPermission_hasPermission()
537 PACKAGE_NAME, in testAssertAdTechHasPermission_hasPermission()
557 when(AppManifestConfigHelper.isAllowedProtectedSignalsAccess(PACKAGE_NAME, ENROLLMENT_ID)) in testAssertAdTechHasSignalsPermission_hasSignalsPermission()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DAppStateUsageStatsBridgeTest.java57 private static final String PACKAGE_NAME = "package.mcpackageface"; field in AppStateUsageStatsBridgeTest
100 addPackageToPackageManager(PACKAGE_NAME, TimeUnit.DAYS.toMillis(1000)); in test_appInstalledSameDayNeverUsed_isInvalid()
102 mBridge.updateExtraInfo(app, PACKAGE_NAME, 0); in test_appInstalledSameDayNeverUsed_isInvalid()
114 addPackageToPackageManager(PACKAGE_NAME, TimeUnit.DAYS.toMillis(1000)); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
116 mBridge.updateExtraInfo(app, PACKAGE_NAME, 0); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
128 addPackageToPackageManager(PACKAGE_NAME, TimeUnit.DAYS.toMillis(910)); in test_unusedApp_isValid()
130 mBridge.updateExtraInfo(app, PACKAGE_NAME, 0); in test_unusedApp_isValid()
142 addPackageToPackageManager(PACKAGE_NAME, TimeUnit.DAYS.toMillis(910)); in test_noThresholdFilter_unusedApp_isValid()
144 mBridge.updateExtraInfo(app, PACKAGE_NAME, 0); in test_noThresholdFilter_unusedApp_isValid()
156 addPackageToPackageManager(PACKAGE_NAME, TimeUnit.DAYS.toMillis(910)); in test_unknownLastUse_isFilteredOut()
[all …]
DAppsAsyncLoaderTest.java60 private static final String PACKAGE_NAME = "package.mcpackageface"; field in AppsAsyncLoaderTest
118 createPackage(PACKAGE_NAME, AppsAsyncLoader.NEVER_USED, 0); in test_appInstalledSameDayNeverUsed_isInvalid()
126 createPackage(PACKAGE_NAME, AppsAsyncLoader.NEVER_USED, 0); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
134 createPackage(PACKAGE_NAME, AppsAsyncLoader.NEVER_USED, 90); in test_unusedApp_isValid()
142 createPackage(PACKAGE_NAME, AppsAsyncLoader.NEVER_USED, 90); in test_noThresholdFilter_unusedApp_isValid()
149 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, -1, 90); in test_unknownLastUse_isFilteredOut()
156 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, -1, 90); in test_noThresholdFilter_unknownLastUse_isFilteredOut()
163 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 1, 200); in test_oldAppRecentlyUsed_isNotValid()
170 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 1, 200); in test_noThresholdFilter_oldAppRecentlyUsed_isValid()
177 AppsAsyncLoader.PackageInfo app = createPackage(PACKAGE_NAME, 199, 200); in test_oldUnusedApp_isValid()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/webview/
DWebViewAppPickerTest.java74 private final static String PACKAGE_NAME = "com.example.test"; field in WebViewAppPickerTest
96 applicationInfo.name = PACKAGE_NAME; in setUp()
99 applicationInfo.packageName = PACKAGE_NAME; in setUp()
102 packageInfo.packageName = PACKAGE_NAME; in setUp()
106 mPackageManager.setUnbadgedApplicationIcon(PACKAGE_NAME, new ColorDrawable()); in setUp()
124 mPackageManager.removePackage(PACKAGE_NAME); in tearDown()
154 createApplicationInfo(PACKAGE_NAME), "disabled"); in testDisabledPackageShownAsDisabled()
157 mPicker.bindPreference(preference, PACKAGE_NAME, webviewAppInfo, null); in testDisabledPackageShownAsDisabled()
158 mPicker.bindPreferenceExtra(preference, PACKAGE_NAME, webviewAppInfo, null, null); in testDisabledPackageShownAsDisabled()
168 createApplicationInfo(PACKAGE_NAME), disabledReason); in testEnabledPackageShownAsEnabled()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/legal/
DModuleLicenseProviderTest.java49 public static final String PACKAGE_NAME = "com.android.test_package"; field in ModuleLicenseProviderTest
86 .appendPath(PACKAGE_NAME) in getType_notContentScheme_throwsIllegalArgumentException()
97 .appendPath(PACKAGE_NAME) in getType_invalidAuthority_throwsIllegalArgumentException()
127 .appendPath(PACKAGE_NAME) in getType_missingFileName_throwsIllegalArgumentException()
137 .appendPath(PACKAGE_NAME) in getType_incorrectFileName_throwsIllegalArgumentException()
150 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_packageNotAModule_throwsIllegalArgumentException()
156 .appendPath(PACKAGE_NAME) in getType_packageNotAModule_throwsIllegalArgumentException()
169 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_validUri_returnsHtmlMimeType()
175 .appendPath(PACKAGE_NAME) in getType_validUri_returnsHtmlMimeType()
186 .appendPath(PACKAGE_NAME) in openFile_notContentScheme_throwsIllegalArgumentException()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/occupantconnection/
DCarOccupantConnectionServiceTest.java74 private static final String PACKAGE_NAME = "my_package_name"; field in CarOccupantConnectionServiceTest
156 () -> mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, in testRegisterReceiverWithoutPermission_throwsException()
172 mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, mPayloadCallback); in testRegisterReceiverWithDuplicateId_throwsException()
179 () -> mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, in testRegisterReceiverWithDuplicateId_throwsException()
188 mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, mPayloadCallback); in testRegisterTwoReceiversWithoutReceiverServiceConnected()
198 assertThat(clientId.packageName).isEqualTo(PACKAGE_NAME); in testRegisterTwoReceiversWithoutReceiverServiceConnected()
210 mService.registerReceiver(PACKAGE_NAME, endpointId2, payloadCallback2); in testRegisterTwoReceiversWithoutReceiverServiceConnected()
242 mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, mPayloadCallback); in testRegisterReceiverThenConnectReceiverService()
286 mService.registerReceiver(PACKAGE_NAME, RECEIVER_ENDPOINT_ID, mPayloadCallback); in testRegisterReceiverWithReceiverServiceConnected()
301 mService.registerReceiver(PACKAGE_NAME, endpointId2, payloadCallback2); in testRegisterReceiverWithReceiverServiceConnected()
[all …]
DClientIdTest.java36 private static final String PACKAGE_NAME = "my_package_name"; field in ClientIdTest
41 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testConstructClientId()
45 assertThat(clientId.packageName).isEqualTo(PACKAGE_NAME); in testConstructClientId()
50 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testEquals()
51 ClientId clientId2 = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testEquals()
59 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentZone()
62 ClientId clientId2 = new ClientId(zone2, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentZone()
69 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentUserId()
70 ClientId clientId2 = new ClientId(OCCUPANT_ZONE, USER_ID + 1, PACKAGE_NAME); in testNotEqualWithDifferentUserId()
78 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentPackageName()
[all …]
DReceiverEndpointIdTest.java35 private static final String PACKAGE_NAME = "my_package_name"; field in ReceiverEndpointIdTest
41 new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME), RECEIVER_ENDPOINT_ID); in testConstructReceiverEndpointId()
45 assertThat(endpointId.clientId.packageName).isEqualTo(PACKAGE_NAME); in testConstructReceiverEndpointId()
51 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testEquals()
63 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentClientId()
66 ClientId clientId2 = new ClientId(OCCUPANT_ZONE, USER_ID + 1, PACKAGE_NAME); in testNotEqualWithDifferentClientId()
76 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNotEqualWithDifferentId()
91 ClientId clientId = new ClientId(OCCUPANT_ZONE, USER_ID, PACKAGE_NAME); in testNullParameter_throwsException()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/toast/
DCarToastUITest.java62 private static final String PACKAGE_NAME = "PACKAGE_NAME"; field in CarToastUITest
99 when(mToastFactory.createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt())) in setUp()
116 mCarToastUI.showToast(UID, PACKAGE_NAME, mIBinder, TEXT, mIBinder, DURATION, in showToast_notSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
119 verify(mToastFactory, never()).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), in showToast_notSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
129 mCarToastUI.showToast(UID, PACKAGE_NAME, mIBinder, TEXT, mIBinder, DURATION, in showToast_notSystemNotPrivilegedIsPlatformKey_createToastCalled()
132 verify(mToastFactory).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt()); in showToast_notSystemNotPrivilegedIsPlatformKey_createToastCalled()
141 mCarToastUI.showToast(UID, PACKAGE_NAME, mIBinder, TEXT, mIBinder, DURATION, in showToast_notSystemIsPrivilegedNotPlatformKey_createToastNotCalled()
144 verify(mToastFactory, never()).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), in showToast_notSystemIsPrivilegedNotPlatformKey_createToastNotCalled()
154 mCarToastUI.showToast(UID, PACKAGE_NAME, mIBinder, TEXT, mIBinder, DURATION, in showToast_notSystemIsPrivilegedIsPlatformKey_createToastCalled()
157 verify(mToastFactory).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt()); in showToast_notSystemIsPrivilegedIsPlatformKey_createToastCalled()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/adselection/
DDBAppInstallPermissionsTest.java33 public static final String PACKAGE_NAME = "package.name"; field in DBAppInstallPermissionsTest
43 .setPackageName(PACKAGE_NAME) in testBuildDBAppInstall()
47 assertEquals(PACKAGE_NAME, appInstall.getPackageName()); in testBuildDBAppInstall()
55 .setPackageName(PACKAGE_NAME) in testEquals()
60 .setPackageName(PACKAGE_NAME) in testEquals()
71 .setPackageName(PACKAGE_NAME) in testNotEqualDifferentType()
82 .setPackageName(PACKAGE_NAME) in testNotEqualSameType()
87 .setPackageName(PACKAGE_NAME + "offset") in testNotEqualSameType()
98 .setPackageName(PACKAGE_NAME) in testToString()
105 + PACKAGE_NAME in testToString()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/
DEnrollmentTest.java48 private static final String PACKAGE_NAME = "com.package.name"; field in EnrollmentTest
68 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_success()
82 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_enrollmentDataNull()
96 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_blockedByEnrollmentBlockList()
110 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_packageManifestCheckFailure()
125 Uri.parse(localhost), PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_localhost_success() local
129 Uri.parse(localhostWithPort), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local
134 Uri.parse(localhostWithPortAndPath), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local
139 Uri.parse(localhostWithPortAndPathAndParams), PACKAGE_NAME, mEnrollmentDao, in testMaybeGetEnrollmentId_localhost_success() local
144 Uri.parse(localhostWithPath), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local
[all …]
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/spa/app/appinfo/
DAppButtonsTest.kt86 whenever(packageInfoPresenter.packageName).thenReturn(PACKAGE_NAME) in setUp()
90 whenever(packageManager.getPackageInfo(PACKAGE_NAME, 0)).thenReturn(PACKAGE_INFO) in setUp()
91 whenever(AppUtils.isMainlineModule(packageManager, PACKAGE_NAME)).thenReturn(false) in setUp()
102 whenever(AppUtils.isMainlineModule(packageManager, PACKAGE_NAME)).thenReturn(true) in isMainlineModule_notDisplayed()
118 whenever(packageManager.getLaunchIntentForPackage(PACKAGE_NAME)).thenReturn(Intent()) in launchButton_displayed_archivingDisabled()
129 whenever(packageManager.getLaunchIntentForPackage(PACKAGE_NAME)).thenReturn(Intent()) in launchButton_notDisplayed_archivingEnabled()
139 whenever(packageManager.getLaunchIntentForPackage(PACKAGE_NAME)).thenReturn(Intent()) in uninstallButton_enabled_whenAppIsArchived()
143 packageName = PACKAGE_NAME in uninstallButton_enabled_whenAppIsArchived()
146 packageName = PACKAGE_NAME in uninstallButton_enabled_whenAppIsArchived()
158 packageName = PACKAGE_NAME in archiveButton_displayed_whenAppIsNotArchived()
[all …]
DPackageInfoPresenterTest.kt67 PackageInfoPresenter(context, PACKAGE_NAME, USER_ID, TestScope(), packageManagers)
72 data = Uri.parse("package:$PACKAGE_NAME") in isInterestedAppChange_packageChanged_isInterested()
83 data = Uri.parse("package:$PACKAGE_NAME") in isInterestedAppChange_fullyRemoved_notInterested()
95 data = Uri.parse("package:$PACKAGE_NAME") in isInterestedAppChange_removedBeforeReplacing_notInterested()
107 data = Uri.parse("package:$PACKAGE_NAME") in isInterestedAppChange_archived_interested()
123 PACKAGE_NAME, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0 in <lambda>()
134 PACKAGE_NAME, PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER, 0 in <lambda>()
148 assertThat(data?.schemeSpecificPart).isEqualTo(PACKAGE_NAME) in <lambda>()
159 verify(mockPackageManager).deletePackageAsUser(PACKAGE_NAME, null, 0, USER_ID) in <lambda>()
168 verify(mockActivityManager).forceStopPackageAsUser(PACKAGE_NAME, USER_ID) in <lambda>()
[all …]
DAppButtonRepositoryTest.kt104 assertThat(homePackageInfo.homePackages).containsExactly(PACKAGE_NAME) in getHomePackageInfo_oneHome()
111 whenever(packageManager.checkSignatures(PACKAGE_NAME_ALTERNATE, PACKAGE_NAME)) in getHomePackageInfo_homeAlternateSignatureMatch()
117 PACKAGE_NAME, PACKAGE_NAME_ALTERNATE in getHomePackageInfo_homeAlternateSignatureMatch()
124 whenever(packageManager.checkSignatures(PACKAGE_NAME_ALTERNATE, PACKAGE_NAME)) in getHomePackageInfo_homeAlternateSignatureNoMatch()
129 assertThat(homePackageInfo.homePackages).containsExactly(PACKAGE_NAME) in getHomePackageInfo_homeAlternateSignatureNoMatch()
136 packageName = PACKAGE_NAME in uninstallDisallowedDueToHomeApp_isNotSystemAndIsCurrentHomeAndHasOnlyOneHomeApp()
153 packageName = PACKAGE_NAME in uninstallDisallowedDueToHomeApp_isNotSystemAndIsCurrentHomeAndHasOtherHomeApps()
170 packageName = PACKAGE_NAME in uninstallDisallowedDueToHomeApp_isSystemAndIsCurrentHomeAndHasOtherHomeApps()
185 const val PACKAGE_NAME = "packageName" constant
189 val COMPONENT_NAME = ComponentName(PACKAGE_NAME, ACTIVITY_NAME)
[all …]
DAppInfoSettingsMoreOptionsTest.kt121 whenever(Utils.isProfileOrDeviceOwner(userManager, devicePolicyManager, PACKAGE_NAME)) in setUp()
132 whenever(Utils.isProfileOrDeviceOwner(userManager, devicePolicyManager, PACKAGE_NAME)) in whenProfileOrDeviceOwner_notDisplayed()
143 packageName = PACKAGE_NAME in uninstallUpdates_updatedSystemAppAndUserAdmin_displayed()
159 packageName = PACKAGE_NAME in uninstallForAllUsers_regularAppAndPrimaryUser_displayed()
163 whenever(packageManagers.isPackageInstalledAsUser(PACKAGE_NAME, OTHER_USER_ID)) in uninstallForAllUsers_regularAppAndPrimaryUser_displayed()
177 packageName = PACKAGE_NAME in uninstallForAllUsers_appHiddenNotInQuietModeAndPrimaryUser_displayed()
182 .isPackageInstalledAsUser(PACKAGE_NAME, OTHER_USER_ID)) in uninstallForAllUsers_appHiddenNotInQuietModeAndPrimaryUser_displayed()
198 packageName = PACKAGE_NAME in uninstallForAllUsers_appHiddenInQuietModeAndPrimaryUser_notDisplayed()
203 .isPackageInstalledAsUser(PACKAGE_NAME, OTHER_USER_ID)) in uninstallForAllUsers_appHiddenInQuietModeAndPrimaryUser_notDisplayed()
218 AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, UID, PACKAGE_NAME, null, null in shouldShowAccessRestrictedSettings_appOp()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/
DApplicationsUtilsTest.java48 private static final String PACKAGE_NAME = "com.android.car.settings.test"; field in ApplicationsUtilsTest
59 ShadowDefaultDialerManager.setDefaultDialerApplication(PACKAGE_NAME); in isKeepEnabledPackage_defaultDialerApplication_returnsTrue()
62 PACKAGE_NAME)).isTrue(); in isKeepEnabledPackage_defaultDialerApplication_returnsTrue()
67 ShadowSmsApplication.setDefaultSmsApplication(new ComponentName(PACKAGE_NAME, "cls")); in isKeepEnabledPackage_defaultSmsApplication_returnsTrue()
70 PACKAGE_NAME)).isTrue(); in isKeepEnabledPackage_defaultSmsApplication_returnsTrue()
76 PACKAGE_NAME)).isFalse(); in isKeepEnabledPackage_returnsFalse()
88 new ComponentName(PACKAGE_NAME, "cls")); in isProfileOrDeviceOwner_profileOwner_returnsTrue()
90 assertThat(ApplicationsUtils.isProfileOrDeviceOwner(PACKAGE_NAME, dpm, profileHelper)) in isProfileOrDeviceOwner_profileOwner_returnsTrue()
97 when(dpm.isDeviceOwnerAppOnAnyUser(PACKAGE_NAME)).thenReturn(true); in isProfileOrDeviceOwner_deviceOwner_returnsTrue()
99 assertThat(ApplicationsUtils.isProfileOrDeviceOwner(PACKAGE_NAME, dpm, in isProfileOrDeviceOwner_deviceOwner_returnsTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/bugreporthandler/
DBugReportHandlerPickerTest.java64 private static final String PACKAGE_NAME = "com.example.test"; field in BugReportHandlerPickerTest
82 applicationInfo.name = PACKAGE_NAME; in setUp()
85 applicationInfo.packageName = PACKAGE_NAME; in setUp()
88 packageInfo.packageName = PACKAGE_NAME; in setUp()
91 mPackageManager.setUnbadgedApplicationIcon(PACKAGE_NAME, new ColorDrawable()); in setUp()
106 mPackageManager.removePackage(PACKAGE_NAME); in tearDown()
141 createApplicationInfo(PACKAGE_NAME), USER_ID))); in testClickingItemSuccess()
142 when(mBugReportHandlerUtil.setCurrentBugReportHandlerAppAndUser(any(), eq(PACKAGE_NAME), in testClickingItemSuccess()
147 BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID)); in testClickingItemSuccess()
151 eq(PACKAGE_NAME), eq(USER_ID)); in testClickingItemSuccess()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/wm/
DBarControlPolicyTest.java43 private static final String PACKAGE_NAME = "sample.app"; field in BarControlPolicyTest
78 String text = "immersive.status=" + PACKAGE_NAME; in reloadFromSetting_validPolicyControlString_setsFilters()
92 String text = "immersive.status=" + PACKAGE_NAME; in reloadFromSetting_filtersSet_doesNotSetFiltersAgain()
106 int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME); in getBarVisibilities_policyControlNotSet_showsSystemBars()
117 "immersive.status=" + PACKAGE_NAME); in getBarVisibilities_immersiveStatusForAppAndMatchingApp_hidesStatusBar() local
120 int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME); in getBarVisibilities_immersiveStatusForAppAndMatchingApp_hidesStatusBar()
131 "immersive.status=" + PACKAGE_NAME); in getBarVisibilities_immersiveStatusForAppAndNonMatchingApp_showsSystemBars() local
148 int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME); in getBarVisibilities_immersiveStatusForAppsAndNonApp_showsSystemBars()
159 "immersive.full=" + PACKAGE_NAME); in getBarVisibilities_immersiveFullForAppAndMatchingApp_hidesSystemBars() local
162 int[] visibilities = BarControlPolicy.getBarVisibilities(PACKAGE_NAME); in getBarVisibilities_immersiveFullForAppAndMatchingApp_hidesSystemBars()
[all …]
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DActivityPermissionRationaleTest.java54 private static final String PACKAGE_NAME = "android.permission.cts.appthatrunsrationaletests"; field in ActivityPermissionRationaleTest
68 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, flag, flag); in setUp()
73 runShellCommand("pm uninstall " + PACKAGE_NAME); in unInstallApp()
81 intent.setComponent(new ComponentName(PACKAGE_NAME, PACKAGE_NAME + ".TestActivity")); in assertAppShowRationaleIs()
93 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, in clearData()
99 sUiAuto.grantRuntimePermission(PACKAGE_NAME, PERMISSION_NAME); in permissionGrantedNoRationale()
107 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, flags, flags); in policyFixedNoRationale()
115 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, flags, flags); in userFixedNoRationale()
122 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, in notUserSetNoRationale()
131 PermissionUtils.setPermissionFlags(PACKAGE_NAME, PERMISSION_NAME, flags, flags); in userSetNeedRationale()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/
DStoragePreferenceControllerTest.java48 private static final String PACKAGE_NAME = "Test Package Name"; field in StoragePreferenceControllerTest
80 mPreferenceController.setPackageName(PACKAGE_NAME); in testCheckInitialized_noApplicationsEntry_throwException()
89 mPreferenceController.setPackageName(PACKAGE_NAME); in testCheckInitialized_noApplicationsState_throwException()
106 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_nullSize_calculatingSummary()
110 mPreferenceController.setPackageName(PACKAGE_NAME); in onCreate_nullSize_calculatingSummary()
120 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_validApp_sizeSummary()
125 mPreferenceController.setPackageName(PACKAGE_NAME); in onCreate_validApp_sizeSummary()
135 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_lateAppLoad_updateSummary()
139 mPreferenceController.setPackageName(PACKAGE_NAME); in onCreate_lateAppLoad_updateSummary()
153 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_packageSizeChange_updateSummary()
[all …]
DApplicationActionButtonsPreferenceControllerTest.java93 private static final String PACKAGE_NAME = "Test Package Name"; field in ApplicationActionButtonsPreferenceControllerTest
134 mPreferenceController.setAppEntry(mMockAppEntry).setPackageName(PACKAGE_NAME); in testCheckInitialized_noAppState_throwException()
142 mPreferenceController.setAppState(mMockAppState).setPackageName(PACKAGE_NAME); in testCheckInitialized_noAppEntry_throwException()
199 activityInfo.packageName = PACKAGE_NAME; in onCreate_bundledApp_homePackage_disablesDisableButton()
217 mPackageInfo.signatures = new Signature[]{new Signature(PACKAGE_NAME.getBytes())}; in onCreate_bundledApp_systemPackage_disablesDisableButton()
231 activityInfo.packageName = PACKAGE_NAME; in onCreate_bundledApp_enabledApp_keepEnabledPackage_disablesDisableButton()
238 any(UserHandle.class))).thenReturn(Collections.singletonList(PACKAGE_NAME)); in onCreate_bundledApp_enabledApp_keepEnabledPackage_disablesDisableButton()
261 when(mMockDpm.packageHasActiveAdmins(PACKAGE_NAME)).thenReturn(true); in onCreate_packageHasActiveAdmins_doesNotDisableUninstallButton()
276 .thenReturn(PACKAGE_NAME); in onCreate_deviceProvisioningPackage_disablesUninstallButton()
288 when(mMockDpm.isUninstallInQueue(PACKAGE_NAME)).thenReturn(true); in onStart_uninstallQueued_disablesUninstallButton()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/
DNotificationsPreferenceTest.java51 private static final String PACKAGE_NAME = "com.example.test"; field in NotificationsPreferenceTest
77 when(mPackageManager.getPackageInfo(eq(PACKAGE_NAME), anyInt())) in setUp()
84 mApplicationInfo.packageName = PACKAGE_NAME; in setUp()
88 mPackageInfo.packageName = PACKAGE_NAME; in setUp()
94 setNotificationsEnabledForPackage(PACKAGE_NAME, true); in testNotificationsPreference_systemAppNotificationsEnabledInRes()
106 setNotificationsEnabledForPackage(PACKAGE_NAME, true); in testNotificationsPreference_systemAppNotificationsEnabledNotInRes()
118 setNotificationsEnabledForPackage(PACKAGE_NAME, true); in testNotificationsPreference_notSystemAppNotificationsEnabledInRes()
130 setNotificationsEnabledForPackage(PACKAGE_NAME, true); in testNotificationsPreference_notSystemAppNotificationsEnabledNotInRes()
142 setNotificationsEnabledForPackage(PACKAGE_NAME, false); in testNotificationsPreference_systemAppNotificationsDisabledNotInRes()
154 setNotificationsEnabledForPackage(PACKAGE_NAME, false); in testNotificationsPreference_notSystemAppNotificationsEDisabledInRes()
[all …]
/packages/modules/Permission/tests/cts/safetycenter/src/android/safetycenter/cts/config/
DSafetySourceTest.kt69 assertThat(DYNAMIC_BAREBONE.packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
70 assertThat(dynamicAllOptional().packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
71 assertThat(DYNAMIC_HIDDEN.packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
72 assertThat(DYNAMIC_HIDDEN_WITH_SEARCH.packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
73 assertThat(DYNAMIC_DISABLED.packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
76 assertThat(ISSUE_ONLY_BAREBONE.packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
77 assertThat(issueOnlyAllOptional().packageName).isEqualTo(PACKAGE_NAME) in getPackageName_returnsPackageNameOrThrows()
83 assertThat(DYNAMIC_BAREBONE.optionalPackageName).isEqualTo(PACKAGE_NAME) in getOptionalPackageName_returnsPackageNameOrNull()
84 assertThat(dynamicAllOptional().optionalPackageName).isEqualTo(PACKAGE_NAME) in getOptionalPackageName_returnsPackageNameOrNull()
85 assertThat(DYNAMIC_HIDDEN.optionalPackageName).isEqualTo(PACKAGE_NAME) in getOptionalPackageName_returnsPackageNameOrNull()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryUtilsTest.java95 private static final String PACKAGE_NAME = "com.android.app"; field in BatteryUtilsTest
249 .getApplicationInfo(PACKAGE_NAME, PackageManager.GET_META_DATA); in testGetTargetSdkVersion_packageExist_returnSdk()
252 assertThat(mBatteryUtils.getTargetSdkVersion(PACKAGE_NAME)).isEqualTo(SDK_VERSION); in testGetTargetSdkVersion_packageExist_returnSdk()
260 .getApplicationInfo(PACKAGE_NAME, PackageManager.GET_META_DATA); in testGetTargetSdkVersion_packageNotExist_returnSdkNull()
262 assertThat(mBatteryUtils.getTargetSdkVersion(PACKAGE_NAME)) in testGetTargetSdkVersion_packageNotExist_returnSdkNull()
270 .checkOpNoThrow(AppOpsManager.OP_RUN_IN_BACKGROUND, UID, PACKAGE_NAME); in testBackgroundRestrictionOn_restrictionOn_returnTrue()
272 assertThat(mBatteryUtils.isBackgroundRestrictionEnabled(SDK_VERSION, UID, PACKAGE_NAME)) in testBackgroundRestrictionOn_restrictionOn_returnTrue()
280 .checkOpNoThrow(AppOpsManager.OP_RUN_IN_BACKGROUND, UID, PACKAGE_NAME); in testBackgroundRestrictionOn_restrictionOff_returnFalse()
282 assertThat(mBatteryUtils.isBackgroundRestrictionEnabled(SDK_VERSION, UID, PACKAGE_NAME)) in testBackgroundRestrictionOn_restrictionOff_returnFalse()
369 AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, UID, PACKAGE_NAME)) in testIsForceAppStandbyEnabled_enabled_returnTrue()
[all …]

1234567891011