Home
last modified time | relevance | path

Searched refs:packageManager (Results 1 – 25 of 167) sorted by relevance

1234567

/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/legal/
DModuleLicenseProviderTest.java151 PackageManager packageManager = mock(PackageManager.class); in getType_packageNotAModule_throwsIllegalArgumentException() local
153 when(context.getPackageManager()).thenReturn(packageManager); in getType_packageNotAModule_throwsIllegalArgumentException()
154 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_packageNotAModule_throwsIllegalArgumentException()
170 PackageManager packageManager = mock(PackageManager.class); in getType_validUri_returnsHtmlMimeType() local
172 when(context.getPackageManager()).thenReturn(packageManager); in getType_validUri_returnsHtmlMimeType()
173 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_validUri_returnsHtmlMimeType()
251 PackageManager packageManager = mock(PackageManager.class); in openFile_packageNotAModule_throwsIllegalArgumentException() local
253 when(context.getPackageManager()).thenReturn(packageManager); in openFile_packageNotAModule_throwsIllegalArgumentException()
254 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in openFile_packageNotAModule_throwsIllegalArgumentException()
270 PackageManager packageManager = mock(PackageManager.class); in openFile_validUri_notReadMode_throwsIllegalArgumentException() local
[all …]
DModuleLicensesListPreferenceControllerTest.java52 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_validLicenses_returnsAvailable() local
53 when(context.getPackageManager()).thenReturn(packageManager); in getAvailabilityStatus_validLicenses_returnsAvailable()
56 when(packageManager.getInstalledModules(0)) in getAvailabilityStatus_validLicenses_returnsAvailable()
61 when(packageManager.getPackageInfo(PACKAGE_NAME, PackageManager.MATCH_APEX)).thenReturn( in getAvailabilityStatus_validLicenses_returnsAvailable()
64 when(packageManager.getResourcesForApplication(applicationInfo)).thenReturn(resources); in getAvailabilityStatus_validLicenses_returnsAvailable()
78 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_noModules_returnsConditionallyUnavailable() local
79 when(context.getPackageManager()).thenReturn(packageManager); in getAvailabilityStatus_noModules_returnsConditionallyUnavailable()
80 when(packageManager.getInstalledModules(0)) in getAvailabilityStatus_noModules_returnsConditionallyUnavailable()
93 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_noLicenses_returnsConditionallyUnavailable() local
94 when(context.getPackageManager()).thenReturn(packageManager); in getAvailabilityStatus_noLicenses_returnsConditionallyUnavailable()
[all …]
DModuleLicensesPreferenceControllerTest.java79 PackageManager packageManager = mock(PackageManager.class); in displayPreference_alphabeticalOrder() local
80 when(context.getPackageManager()).thenReturn(packageManager); in displayPreference_alphabeticalOrder()
85 when(packageManager.getInstalledModules(0)) in displayPreference_alphabeticalOrder()
90 when(packageManager.getPackageInfo(MODULE_1_PACKAGE_NAME, PackageManager.MATCH_APEX)) in displayPreference_alphabeticalOrder()
92 when(packageManager.getPackageInfo(MODULE_2_PACKAGE_NAME, PackageManager.MATCH_APEX)) in displayPreference_alphabeticalOrder()
95 when(packageManager.getResourcesForApplication(applicationInfo)).thenReturn(resources); in displayPreference_alphabeticalOrder()
113 PackageManager packageManager = mock(PackageManager.class); in displayPreference_includeOnlyModulesWithLicenseFile() local
114 when(context.getPackageManager()).thenReturn(packageManager); in displayPreference_includeOnlyModulesWithLicenseFile()
119 when(packageManager.getInstalledModules(0)) in displayPreference_includeOnlyModulesWithLicenseFile()
124 when(packageManager.getPackageInfo(MODULE_1_PACKAGE_NAME, PackageManager.MATCH_APEX)) in displayPreference_includeOnlyModulesWithLicenseFile()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/inputmethod/
DKeyboardPreferenceControllerTest.java101 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasOneInputMethodInfo() local
102 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL)); in refreshUi_permitAllInputMethods_hasOneInputMethodInfo()
115 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo() local
116 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL)); in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo()
117 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL_1)); in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo()
131 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo() local
132 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL)); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
133 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL_1)); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
134 infos.add(createInputMethodInfo(packageManager, DUMMY_PACKAGE_NAME, DUMMY_LABEL_2)); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
150 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_hasAllowedImeByOrganization() local
[all …]
DEnabledKeyboardPreferenceControllerTest.java219 PackageManager packageManager = mContext.getPackageManager(); in createInputMethodInfoList() local
221 packageManager, getShadowInputMethodManager(mContext), packageName)); in createInputMethodInfoList()
226 PackageManager packageManager, ShadowInputMethodManager inputMethodManager, in createMockInputMethodInfoWithSubtypes() argument
228 InputMethodInfo mockInfo = createMockInputMethodInfo(packageManager, packageName); in createMockInputMethodInfoWithSubtypes()
236 PackageManager packageManager, String packageName) { in createMockInputMethodInfo() argument
240 when(mockInfo.loadLabel(packageManager)).thenReturn(DUMMY_LABEL); in createMockInputMethodInfo()
/packages/apps/Car/LensPicker/src/com/android/support/car/lenspicker/
DResolverAdapter.java92 PackageManager packageManager = mContext.getPackageManager(); in doInBackground() local
98 ApplicationInfo aInfo = packageManager.getApplicationInfo(packageName, 0); in doInBackground()
104 displayName = info.loadLabel(packageManager).toString(); in doInBackground()
113 displayName = getComponentLabel(packageManager, aInfo); in doInBackground()
118 intent = LensPickerUtils.getMediaLaunchIntent(packageManager, packageName, in doInBackground()
129 getComponentIcon(packageManager, aInfo), intent, in doInBackground()
148 private Drawable getComponentIcon(PackageManager packageManager, ApplicationInfo info) { in getComponentIcon() argument
149 return packageManager.getApplicationIcon(info); in getComponentIcon()
155 private String getComponentLabel(PackageManager packageManager, ApplicationInfo info) { in getComponentLabel() argument
156 CharSequence appLabel = packageManager.getApplicationLabel(info); in getComponentLabel()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/source/
DMediaSourcesLiveDataTest.java79 ShadowPackageManager packageManager = shadowOf(application.getPackageManager()); in setUp() local
89 packageManager.addPackage(packageInfo); in setUp()
99 packageManager.addPackage(packageInfo); in setUp()
179 ShadowPackageManager packageManager = shadowOf(application.getPackageManager()); in setPackageManagerResolveInfos() local
180 packageManager.removeResolveInfosForIntent(mActivityIntent, TEST_ACTIVITY_PACKAGE_1); in setPackageManagerResolveInfos()
181 packageManager.removeResolveInfosForIntent(mActivityIntent, TEST_ACTIVITY_PACKAGE_2); in setPackageManagerResolveInfos()
182 packageManager.removeResolveInfosForIntent(mServiceIntent, TEST_SERVICE_PACKAGE_1); in setPackageManagerResolveInfos()
183 packageManager.removeResolveInfosForIntent(mServiceIntent, TEST_SERVICE_PACKAGE_2); in setPackageManagerResolveInfos()
184 packageManager.removeResolveInfosForIntent(mServiceIntent, in setPackageManagerResolveInfos()
187 packageManager.addResolveInfoForIntent(mActivityIntent, activityResolveInfo); in setPackageManagerResolveInfos()
[all …]
/packages/apps/PermissionController/src/com/android/packageinstaller/role/model/
DPermissions.java158 PackageManager packageManager = context.getPackageManager(); in grant() local
160 packageManager.getWhitelistedRestrictedPermissions(packageName, in grant()
173 packageManager.addWhitelistedRestrictedPermission(packageName, permission, in grant()
412 PackageManager packageManager = context.getPackageManager(); in revoke() local
414 packageManager.getWhitelistedRestrictedPermissions(packageName, in revoke()
429 packageManager.removeWhitelistedRestrictedPermission(packageName, permission, in revoke()
576 PackageManager packageManager = context.getPackageManager(); in getPermissionFlags() local
578 return packageManager.getPermissionFlags(permission, packageName, user); in getPermissionFlags()
616 PackageManager packageManager = context.getPackageManager(); in setPermissionFlags() local
618 packageManager.updatePermissionFlags(permission, packageName, mask, flags, user); in setPermissionFlags()
[all …]
DAssistantRoleBehavior.java65 PackageManager packageManager = context.getPackageManager(); in onRoleAdded() local
66 if (packageManager.isDeviceUpgrading()) { in onRoleAdded()
151 PackageManager packageManager = context.getPackageManager(); in isPackageQualified() local
156 List<ResolveInfo> services = packageManager.queryIntentServices(pkgServiceProbe, in isPackageQualified()
164 if (isAssistantVoiceInteractionService(packageManager, service.serviceInfo)) { in isPackageQualified()
171 boolean hasAssistantActivity = !packageManager.queryIntentActivities(pkgActivityProbe, in isPackageQualified()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/inputmethod/
DAvailableVirtualKeyboardFragment.java96 private static Drawable loadDrawable(@NonNull final PackageManager packageManager, in loadDrawable() argument
103 return packageManager.getDrawable(packageName, resId, applicationInfo); in loadDrawable()
110 private static Drawable getInputMethodIcon(@NonNull final PackageManager packageManager, in getInputMethodIcon() argument
120 Drawable drawable = loadDrawable(packageManager, packageName, si.logo, ai); in getInputMethodIcon()
124 drawable = loadDrawable(packageManager, packageName, si.icon, ai); in getInputMethodIcon()
130 drawable = loadDrawable(packageManager, packageName, ai.logo, ai); in getInputMethodIcon()
134 drawable = loadDrawable(packageManager, packageName, ai.icon, ai); in getInputMethodIcon()
147 final PackageManager packageManager = getActivity().getPackageManager(); in updateInputMethodPreferenceViews() local
156 pref.setIcon(getInputMethodIcon(packageManager, imi)); in updateInputMethodPreferenceViews()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/inputmethod/
DAvailableVirtualKeyboardFragment.java97 private static Drawable loadDrawable(@NonNull final PackageManager packageManager, in loadDrawable() argument
104 return packageManager.getDrawable(packageName, resId, applicationInfo); in loadDrawable()
111 private static Drawable getInputMethodIcon(@NonNull final PackageManager packageManager, in getInputMethodIcon() argument
121 Drawable drawable = loadDrawable(packageManager, packageName, si.logo, ai); in getInputMethodIcon()
125 drawable = loadDrawable(packageManager, packageName, si.icon, ai); in getInputMethodIcon()
131 drawable = loadDrawable(packageManager, packageName, ai.logo, ai); in getInputMethodIcon()
135 drawable = loadDrawable(packageManager, packageName, ai.icon, ai); in getInputMethodIcon()
148 final PackageManager packageManager = getActivity().getPackageManager(); in updateInputMethodPreferenceViews() local
157 pref.setIcon(getInputMethodIcon(packageManager, imi)); in updateInputMethodPreferenceViews()
/packages/apps/Messaging/src/com/android/messaging/receiver/
DSmsReceiver.java106 final PackageManager packageManager = context.getPackageManager(); in updateSmsReceiveHandler() local
112 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
120 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
128 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
135 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
143 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
146 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
153 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
156 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
164 packageManager.setComponentEnabledSetting( in updateSmsReceiveHandler()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/system/legal/
DLegalPreferenceControllerTest.java101 ShadowPackageManager packageManager = Shadows.shadowOf(mContext.getPackageManager()); in refreshUi_intentResolvesToActivity_isVisible() local
102 packageManager.addResolveInfoForIntent(intent, list); in refreshUi_intentResolvesToActivity_isVisible()
127 ShadowPackageManager packageManager = Shadows.shadowOf(mContext.getPackageManager()); in refreshUi_intentResolvesToActivity_updatesTitle() local
128 packageManager.addResolveInfoForIntent(intent, list); in refreshUi_intentResolvesToActivity_updatesTitle()
159 ShadowPackageManager packageManager = Shadows.shadowOf(mContext.getPackageManager()); in refreshUi_intentResolvesToActivity_updatesIntentToSpecificActivity() local
160 packageManager.addResolveInfoForIntent(intent, list); in refreshUi_intentResolvesToActivity_updatesIntentToSpecificActivity()
171 ShadowPackageManager packageManager = Shadows.shadowOf(mContext.getPackageManager()); in refreshUi_intentResolvesToNull_isNotVisible() local
173 packageManager.addResolveInfoForIntent(mControllerHelper.getController().getIntent(), in refreshUi_intentResolvesToNull_isNotVisible()
/packages/apps/Settings/src/com/android/settings/applications/
DApplicationFeatureProviderImpl.java173 PackageManager packageManager, NumberOfAppsCallback callback) { in CurrentUserAndManagedProfilePolicyInstalledAppCounter() argument
174 super(context, PackageManager.INSTALL_REASON_POLICY, packageManager); in CurrentUserAndManagedProfilePolicyInstalledAppCounter()
189 String[] permissions, PackageManager packageManager, in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter() argument
192 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter()
205 CurrentUserPolicyInstalledAppLister(PackageManager packageManager, in CurrentUserPolicyInstalledAppLister() argument
207 super(packageManager, userManager); in CurrentUserPolicyInstalledAppLister()
222 PackageManager packageManager, IPackageManager packageManagerService, in CurrentUserAppWithAdminGrantedPermissionsLister() argument
225 super(permissions, packageManager, packageManagerService, devicePolicyManager, in CurrentUserAppWithAdminGrantedPermissionsLister()
DAppWithAdminGrantedPermissionsCounter.java37 PackageManager packageManager, IPackageManager packageManagerService, in AppWithAdminGrantedPermissionsCounter() argument
39 super(context, packageManager); in AppWithAdminGrantedPermissionsCounter()
52 DevicePolicyManager devicePolicyManager, PackageManager packageManager, in includeInCount() argument
68 if (packageManager.getInstallReason(info.packageName, in includeInCount()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DApplicationFeatureProviderImpl.java173 PackageManager packageManager, NumberOfAppsCallback callback) { in CurrentUserAndManagedProfilePolicyInstalledAppCounter() argument
174 super(context, PackageManager.INSTALL_REASON_POLICY, packageManager); in CurrentUserAndManagedProfilePolicyInstalledAppCounter()
189 String[] permissions, PackageManager packageManager, in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter() argument
192 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter()
205 CurrentUserPolicyInstalledAppLister(PackageManager packageManager, in CurrentUserPolicyInstalledAppLister() argument
207 super(packageManager, userManager); in CurrentUserPolicyInstalledAppLister()
222 PackageManager packageManager, IPackageManager packageManagerService, in CurrentUserAppWithAdminGrantedPermissionsLister() argument
225 super(permissions, packageManager, packageManagerService, devicePolicyManager, in CurrentUserAppWithAdminGrantedPermissionsLister()
DAppWithAdminGrantedPermissionsCounter.java37 PackageManager packageManager, IPackageManager packageManagerService, in AppWithAdminGrantedPermissionsCounter() argument
39 super(context, packageManager); in AppWithAdminGrantedPermissionsCounter()
52 DevicePolicyManager devicePolicyManager, PackageManager packageManager, in includeInCount() argument
68 if (packageManager.getInstallReason(info.packageName, in includeInCount()
/packages/apps/Car/Notification/src/com/android/car/notification/
DNotificationUtils.java67 PackageManager packageManager = context.getPackageManager(); in isSystemApp() local
71 packageInfo = packageManager.getPackageInfoAsUser( in isSystemApp()
87 PackageManager packageManager = context.getPackageManager(); in isSignedWithPlatformKey() local
91 packageInfo = packageManager.getPackageInfoAsUser( in isSignedWithPlatformKey()
104 PackageManager packageManager = context.getPackageManager(); in isSystemPrivilegedOrPlatformKeyInner() local
108 packageInfo = packageManager.getPackageInfoAsUser( in isSystemPrivilegedOrPlatformKeyInner()
/packages/apps/Car/Launcher/src/com/android/car/carlauncher/
DAppLauncherUtils.java137 static ComponentName getMediaSource(@NonNull PackageManager packageManager, in getMediaSource() argument
143 List<ResolveInfo> mediaServices = packageManager.queryIntentServices(mediaIntent, in getMediaSource()
180 PackageManager packageManager) { in getLauncherApps() argument
182 if (launcherApps == null || carPackageManager == null || packageManager == null) { in getLauncherApps()
186 List<ResolveInfo> mediaServices = packageManager.queryIntentServices( in getLauncherApps()
211 info.serviceInfo.loadLabel(packageManager), in getLauncherApps()
213 info.serviceInfo.loadIcon(packageManager), in getLauncherApps()
223 packageManager.getLaunchIntentForPackage(packageName))); in getLauncherApps()
/packages/apps/Settings/tests/robotests/src/com/android/settings/backup/
DBackupSettingsHelperTest.java213 PackageManager packageManager = mock(PackageManager.class); in testIsIntentProvidedByTransport_WithInvalidIntent() local
214 when(mContext.getPackageManager()).thenReturn(packageManager); in testIsIntentProvidedByTransport_WithInvalidIntent()
215 when(intent.resolveActivity(packageManager)).thenReturn(null); in testIsIntentProvidedByTransport_WithInvalidIntent()
228 PackageManager packageManager = mock(PackageManager.class); in testIsIntentProvidedByTransport_WithIntent() local
229 when(mContext.getPackageManager()).thenReturn(packageManager); in testIsIntentProvidedByTransport_WithIntent()
230 when(intent.resolveActivity(packageManager)).thenReturn(mock(ComponentName.class)); in testIsIntentProvidedByTransport_WithIntent()
284 PackageManager packageManager = mock(PackageManager.class); in testGetIntentForBackupSettings_WithIntentFromTransport() local
285 when(mContext.getPackageManager()).thenReturn(packageManager); in testGetIntentForBackupSettings_WithIntentFromTransport()
286 when(intent.resolveActivity(packageManager)).thenReturn(mock(ComponentName.class)); in testGetIntentForBackupSettings_WithIntentFromTransport()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/
DUserDialogs.java84 PackageManager packageManager = context.getPackageManager(); in createRemoveManagedUserDialogView() local
95 Drawable badgedApplicationIcon = packageManager.getUserBadgedIcon( in createRemoveManagedUserDialogView()
96 packageManager.getApplicationIcon(mdmApplicationInfo), new UserHandle(userId)); in createRemoveManagedUserDialogView()
99 CharSequence appLabel = packageManager.getApplicationLabel(mdmApplicationInfo); in createRemoveManagedUserDialogView()
100 CharSequence badgedAppLabel = packageManager.getUserBadgedLabel(appLabel, in createRemoveManagedUserDialogView()
/packages/apps/Settings/src/com/android/settings/users/
DUserDialogs.java84 PackageManager packageManager = context.getPackageManager(); in createRemoveManagedUserDialogView() local
95 Drawable badgedApplicationIcon = packageManager.getUserBadgedIcon( in createRemoveManagedUserDialogView()
96 packageManager.getApplicationIcon(mdmApplicationInfo), new UserHandle(userId)); in createRemoveManagedUserDialogView()
99 CharSequence appLabel = packageManager.getApplicationLabel(mdmApplicationInfo); in createRemoveManagedUserDialogView()
100 CharSequence badgedAppLabel = packageManager.getUserBadgedLabel(appLabel, in createRemoveManagedUserDialogView()
/packages/apps/PermissionController/src/com/android/packageinstaller/role/utils/
DPackageUtils.java48 PackageManager packageManager = context.getPackageManager(); in getPackageInfo() local
50 return packageManager.getPackageInfo(packageName, PackageManager.MATCH_DIRECT_BOOT_AWARE in getPackageInfo()
68 PackageManager packageManager = context.getPackageManager(); in getApplicationInfo() local
70 return packageManager.getApplicationInfo(packageName, in getApplicationInfo()
/packages/apps/TV/partner_support/tests/robotests/javatests/com/google/android/tv/partner/support/
DBaseCustomizationTest.java52 private PackageManager packageManager; field in BaseCustomizationTest
58 packageManager = mock(PackageManager.class); in setUp()
59 when(context.getPackageManager()).thenReturn(packageManager); in setUp()
64 when(packageManager.getPackagesHoldingPermissions(PERMISSIONS, 0)).thenReturn(packageInfos); in setUp()
/packages/apps/Contacts/src/com/android/contacts/util/
DPhoneCapabilityTester.java49 final PackageManager packageManager = context.getPackageManager(); in isIntentRegistered() local
50 final List<ResolveInfo> receiverList = packageManager.queryIntentActivities(intent, in isIntentRegistered()
85 final PackageManager packageManager = context.getPackageManager(); in getSmsComponent() local
88 final List<ResolveInfo> resolveInfos = packageManager.queryIntentActivities(intent, 0); in getSmsComponent()

1234567