Home
last modified time | relevance | path

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

12345678910>>...12

/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/legal/
DModuleLicenseProviderTest.java147 PackageManager packageManager = mock(PackageManager.class); in getType_packageNotAModule_throwsIllegalArgumentException() local
149 when(context.getPackageManager()).thenReturn(packageManager); in getType_packageNotAModule_throwsIllegalArgumentException()
150 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_packageNotAModule_throwsIllegalArgumentException()
166 PackageManager packageManager = mock(PackageManager.class); in getType_validUri_returnsHtmlMimeType() local
168 when(context.getPackageManager()).thenReturn(packageManager); in getType_validUri_returnsHtmlMimeType()
169 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in getType_validUri_returnsHtmlMimeType()
247 PackageManager packageManager = mock(PackageManager.class); in openFile_packageNotAModule_throwsIllegalArgumentException() local
249 when(context.getPackageManager()).thenReturn(packageManager); in openFile_packageNotAModule_throwsIllegalArgumentException()
250 when(packageManager.getModuleInfo(PACKAGE_NAME, 0)) in openFile_packageNotAModule_throwsIllegalArgumentException()
266 PackageManager packageManager = mock(PackageManager.class); in openFile_validUri_notReadMode_throwsIllegalArgumentException() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/legal/
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/DocumentsUI/tests/unit/com/android/documentsui/
DIconUtilsTest.java80 PackageManager packageManager = mock(PackageManager.class); in testLoadPackageIcon() local
83 when(context.getPackageManager()).thenReturn(packageManager); in testLoadPackageIcon()
84 when(packageManager.resolveContentProvider(eq(authority), anyInt())).thenReturn( in testLoadPackageIcon()
86 when(packageManager.getDrawable(anyString(), eq(icon), any(ApplicationInfo.class))) in testLoadPackageIcon()
92 verify(packageManager).getDrawable(any(), eq(icon), any()); in testLoadPackageIcon()
93 verify(packageManager, never()).getUserBadgedIcon(drawable, in testLoadPackageIcon()
104 PackageManager packageManager = mock(PackageManager.class); in testLoadPackageIcon_maybeShowBadge() local
107 when(context.getPackageManager()).thenReturn(packageManager); in testLoadPackageIcon_maybeShowBadge()
108 when(packageManager.resolveContentProvider(eq(authority), anyInt())).thenReturn( in testLoadPackageIcon_maybeShowBadge()
110 when(packageManager.getDrawable(any(), eq(icon), any())).thenReturn(drawable); in testLoadPackageIcon_maybeShowBadge()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/inputmethod/
DKeyboardPreferenceControllerTest.java114 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasOneInputMethodInfo() local
116 createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_LABEL)); in refreshUi_permitAllInputMethods_hasOneInputMethodInfo()
129 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo() local
130 infos.add(createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo()
132 infos.add(createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo()
147 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo() local
148 infos.add(createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
150 infos.add(createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
152 infos.add(createInputMethodInfo(packageManager, PLACEHOLDER_PACKAGE_NAME, in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
169 PackageManager packageManager = mContext.getPackageManager(); in refreshUi_hasAllowedImeByOrganization() local
[all …]
/packages/apps/Car/Launcher/src/com/android/car/carlauncher/
DAppLauncherUtils.java161 static ComponentName getMediaSource(@NonNull PackageManager packageManager, in getMediaSource() argument
167 List<ResolveInfo> mediaServices = packageManager.queryIntentServices(mediaIntent, in getMediaSource()
209 PackageManager packageManager, in getLauncherApps() argument
213 if (launcherApps == null || carPackageManager == null || packageManager == null in getLauncherApps()
221 packageManager.queryIntentServices( in getLauncherApps()
252 info.serviceInfo.loadLabel(packageManager), in getLauncherApps()
254 info.serviceInfo.loadIcon(packageManager), in getLauncherApps()
298 List<ResolveInfo> disabledActivities = getDisabledActivities(context, packageManager, in getLauncherApps()
317 info.activityInfo.loadLabel(packageManager), in getLauncherApps()
319 info.activityInfo.loadIcon(packageManager), in getLauncherApps()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/
DApplicationFeatureProviderImpl.java194 PackageManager packageManager, NumberOfAppsCallback callback) { in CurrentUserAndManagedProfilePolicyInstalledAppCounter() argument
195 super(context, PackageManager.INSTALL_REASON_POLICY, packageManager); in CurrentUserAndManagedProfilePolicyInstalledAppCounter()
210 String[] permissions, PackageManager packageManager, in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter() argument
213 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter()
226 CurrentUserPolicyInstalledAppLister(PackageManager packageManager, in CurrentUserPolicyInstalledAppLister() argument
228 super(packageManager, userManager); in CurrentUserPolicyInstalledAppLister()
243 PackageManager packageManager, IPackageManager packageManagerService, in CurrentUserAppWithAdminGrantedPermissionsLister() argument
246 super(permissions, packageManager, packageManagerService, devicePolicyManager, in CurrentUserAppWithAdminGrantedPermissionsLister()
261 ComponentInfo findEuiccService(PackageManager packageManager) { in findEuiccService() argument
264 packageManager.queryIntentServices(intent, EUICC_QUERY_FLAGS); in findEuiccService()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settingslib/applications/
DApplicationFeatureProviderImpl.java198 PackageManager packageManager, NumberOfAppsCallback callback) { in CurrentUserAndManagedProfilePolicyInstalledAppCounter() argument
199 super(context, PackageManager.INSTALL_REASON_POLICY, packageManager); in CurrentUserAndManagedProfilePolicyInstalledAppCounter()
214 String[] permissions, PackageManager packageManager, in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter() argument
217 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter()
230 CurrentUserPolicyInstalledAppLister(PackageManager packageManager, in CurrentUserPolicyInstalledAppLister() argument
232 super(packageManager, userManager); in CurrentUserPolicyInstalledAppLister()
247 PackageManager packageManager, IPackageManager packageManagerService, in CurrentUserAppWithAdminGrantedPermissionsLister() argument
250 super(permissions, packageManager, packageManagerService, devicePolicyManager, in CurrentUserAppWithAdminGrantedPermissionsLister()
265 ComponentInfo findEuiccService(PackageManager packageManager) { in findEuiccService() argument
268 packageManager.queryIntentServices(intent, EUICC_QUERY_FLAGS); in findEuiccService()
[all …]
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/service/
DRuntimePermissionsUpgradeControllerTest.kt99 lateinit var packageManager: PackageManager in <lambda>() variable in com.android.permissioncontroller.tests.mocking.permission.service.RuntimePermissionsUpgradeControllerTest
119 whenever(packageManager.getInstalledPackagesAsUser(anyInt(), anyInt())).thenAnswer { in <lambda>()
142 whenever(packageManager.getPackageInfo(anyString(), anyInt())).thenAnswer { in <lambda>()
145 packageManager.getInstalledPackagesAsUser(0, 0) in <lambda>()
150 whenever(packageManager.getPermissionFlags(any(), any(), any())).thenAnswer { in <lambda>()
184 whenever(application.packageManager).thenReturn(packageManager) in <lambda>()
186 whenever(packageManager.getPermissionInfo(any(), anyInt())).thenAnswer { in <lambda>()
189 InstrumentationRegistry.getInstrumentation().getTargetContext().packageManager in <lambda>()
193 whenever(packageManager.getPermissionGroupInfo(any(), anyInt())).thenAnswer { in <lambda>()
196 InstrumentationRegistry.getInstrumentation().getTargetContext().packageManager in <lambda>()
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DDeviceManagementRoleHolderHelper.java192 PackageManager packageManager) { in isRoleHolderValid() argument
196 .filter(action -> !canResolveIntent(packageManager, roleHolderPackageName, action)) in isRoleHolderValid()
208 PackageManager packageManager, in canResolveIntent() argument
213 return mResolveIntentChecker.canResolveIntent(intent, packageManager); in canResolveIntent()
218 PackageManager packageManager) { in isRoleHolderPresent() argument
240 boolean canResolveIntent(Intent intent, PackageManager packageManager); in canResolveIntent() argument
248 public boolean canResolveIntent(Intent intent, PackageManager packageManager) { in canResolveIntent() argument
249 return intent.resolveActivity(packageManager) != null; in canResolveIntent()
260 boolean isRoleHolderStub(String packageName, PackageManager packageManager); in isRoleHolderStub() argument
268 public boolean isRoleHolderStub(String packageName, PackageManager packageManager) { in isRoleHolderStub() argument
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/inputmethod/
DAvailableVirtualKeyboadState.java89 final PackageManager packageManager = mContext.getPackageManager(); in updateInputMethodPreferenceViews() local
105 prefController.getPrefCompat().setIcon(getInputMethodIcon(packageManager, imi)); in updateInputMethodPreferenceViews()
113 private static Drawable loadDrawable(@NonNull final PackageManager packageManager, in loadDrawable() argument
120 return packageManager.getDrawable(packageName, resId, applicationInfo); in loadDrawable()
127 private static Drawable getInputMethodIcon(@NonNull final PackageManager packageManager, in getInputMethodIcon() argument
137 Drawable drawable = loadDrawable(packageManager, packageName, si.logo, ai); in getInputMethodIcon()
141 drawable = loadDrawable(packageManager, packageName, si.icon, ai); in getInputMethodIcon()
147 drawable = loadDrawable(packageManager, packageName, ai.logo, ai); in getInputMethodIcon()
151 drawable = loadDrawable(packageManager, packageName, ai.icon, ai); in getInputMethodIcon()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/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
160 pref.setIcon(getInputMethodIcon(packageManager, imi)); in updateInputMethodPreferenceViews()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DDeviceManagementRoleHolderHelperTest.java417 /* resolveIntentChecker= */ (intent, packageManager) -> true, in createRoleHolderHelper()
418 /* roleHolderStubChecker= */ (packageName, packageManager) -> false, in createRoleHolderHelper()
427 /* resolveIntentChecker= */ (intent, packageManager) -> true, in createRoleHolderHelper()
428 /* roleHolderStubChecker= */ (packageName, packageManager) -> false, in createRoleHolderHelper()
436 /* resolveIntentChecker= */ (intent, packageManager) -> true, in createRoleHolderHelperWithRoleHolderNotInstalled()
437 /* roleHolderStubChecker= */ (packageName, packageManager) -> false, in createRoleHolderHelperWithRoleHolderNotInstalled()
445 /* resolveIntentChecker= */ (intent, packageManager) -> true, in createRoleHolderHelperWithStubRoleHolder()
446 /* roleHolderStubChecker= */ (packageName, packageManager) -> true, in createRoleHolderHelperWithStubRoleHolder()
455 /* resolveIntentChecker= */ (intent, packageManager) -> false, in createRoleHolderHelperWithInvalidRoleHolder()
456 /* roleHolderStubChecker= */ (packageName, packageManager) -> false, in createRoleHolderHelperWithInvalidRoleHolder()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DKotlinUtils.kt196 icon = Utils.loadDrawable(context.packageManager, groupInfo.packageName, in <lambda>()
222 return groupInfo.loadSafeLabel(context.packageManager, 0f, in <lambda>()
240 description = groupInfo.loadDescription(context.packageManager) ?: groupName in <lambda>()
242 description = groupInfo.loadDescription(context.packageManager) ?: groupName in <lambda>()
256 context.packageManager.getPermissionInfo(permName, 0).loadSafeLabel( in <lambda>()
257 context.packageManager, 20000.toFloat(), TextUtils.SAFE_STRING_FLAG_TRIM) in <lambda>()
273 val permInfo = context.packageManager.getPermissionInfo(permName, 0) in <lambda>()
276 icon = Utils.applyTint(context, permInfo.loadUnbadgedIcon(context.packageManager), in <lambda>()
303 val permInfo = context.packageManager.getPermissionInfo(permName, 0) in <lambda>()
304 permInfo.loadDescription(context.packageManager) ?: "" in <lambda>()
[all …]
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/enterprise/apps/
DApplicationFeatureProviderImpl.java134 PackageManager packageManager, NumberOfAppsCallback callback) { in CurrentUserAndManagedProfilePolicyInstalledAppCounter() argument
135 super(context, PackageManager.INSTALL_REASON_POLICY, packageManager); in CurrentUserAndManagedProfilePolicyInstalledAppCounter()
150 String[] permissions, PackageManager packageManager, in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter() argument
153 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); in CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter()
166 CurrentUserPolicyInstalledAppLister(PackageManager packageManager, in CurrentUserPolicyInstalledAppLister() argument
168 super(packageManager, userManager); in CurrentUserPolicyInstalledAppLister()
183 PackageManager packageManager, IPackageManager packageManagerService, in CurrentUserAppWithAdminGrantedPermissionsLister() argument
186 super(permissions, packageManager, packageManagerService, devicePolicyManager, in CurrentUserAppWithAdminGrantedPermissionsLister()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/dpp/
DWifiDppQrCodeGeneratorFragmentTest.java123 PackageManager packageManager = mock(PackageManager.class); in createNearbyButtonFromSetting_notNull() local
124 doReturn(createResolveInfo(0)).when(packageManager).resolveActivity(any(), anyInt()); in createNearbyButtonFromSetting_notNull()
131 when(packageManager.getResourcesForActivity(any())).thenReturn(resources); in createNearbyButtonFromSetting_notNull()
133 when(mContext.getPackageManager()).thenReturn(packageManager); in createNearbyButtonFromSetting_notNull()
145 PackageManager packageManager = mock(PackageManager.class); in createNearbyButtonFromConfig_notNull() local
146 doReturn(createResolveInfo(0)).when(packageManager).resolveActivity(any(), anyInt()); in createNearbyButtonFromConfig_notNull()
153 when(packageManager.getResourcesForActivity(any())).thenReturn(resources); in createNearbyButtonFromConfig_notNull()
155 when(mContext.getPackageManager()).thenReturn(packageManager); in createNearbyButtonFromConfig_notNull()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/model/
DPermissions.java179 PackageManager packageManager = context.getPackageManager(); in grant() local
181 packageManager.getWhitelistedRestrictedPermissions(packageName, in grant()
194 packageManager.addWhitelistedRestrictedPermission(packageName, permission, in grant()
432 PackageManager packageManager = context.getPackageManager(); in revoke() local
434 packageManager.getWhitelistedRestrictedPermissions(packageName, in revoke()
449 packageManager.removeWhitelistedRestrictedPermission(packageName, permission, in revoke()
595 PackageManager packageManager = context.getPackageManager(); in getPermissionFlags() local
597 return packageManager.getPermissionFlags(permission, packageName, user); in getPermissionFlags()
635 PackageManager packageManager = context.getPackageManager(); in setPermissionFlags() local
637 packageManager.updatePermissionFlags(permission, packageName, mask, flags, user); in setPermissionFlags()
[all …]
/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/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/enterprise/
DManagedDeviceActionDisabledByAdminController.java90 PackageManager packageManager = context.getPackageManager(); in canLaunchHelpPageInPreferredOrCurrentUser() local
92 packageManager, url, preferredUserHandle, mResolveActivityChecker) in canLaunchHelpPageInPreferredOrCurrentUser()
97 packageManager, url, context.getUser(), mResolveActivityChecker); in canLaunchHelpPageInPreferredOrCurrentUser()
107 PackageManager packageManager = context.getPackageManager(); in setupLearnMoreButtonToLaunchHelpPage() local
109 packageManager, url, preferredUserHandle, mResolveActivityChecker) in setupLearnMoreButtonToLaunchHelpPage()
114 packageManager, url, context.getUser(), mResolveActivityChecker)) { in setupLearnMoreButtonToLaunchHelpPage()
DActionDisabledLearnMoreButtonLauncher.java39 (packageManager, url, userHandle) -> packageManager.resolveActivityAsUser(
46 PackageManager packageManager, String url, UserHandle userHandle); in canResolveActivityAsUser() argument
127 PackageManager packageManager, in canLaunchHelpPage() argument
131 return resolveActivityChecker.canResolveActivityAsUser(packageManager, url, userHandle); in canLaunchHelpPage()
/packages/modules/Wifi/service/tests/mts/src/android/net/wifi/mts/
DWifiFeature.java24 PackageManager packageManager = context.getPackageManager(); in isWifiSupported() local
25 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI); in isWifiSupported()
29 PackageManager packageManager = context.getPackageManager(); in isP2pSupported() local
30 return packageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT); in isP2pSupported()
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/interactacrossprofiles/
DInteractAcrossProfilesSettings.java135 PackageManager packageManager, UserManager userManager, in collectConfigurableApps() argument
148 packageManager, personalProfile, workProfile)) { in collectConfigurableApps()
158 PackageManager packageManager, UserHandle personalProfile, UserHandle workProfile) { in getAllInstalledPackages() argument
159 List<PackageInfo> personalPackages = packageManager.getInstalledPackagesAsUser( in getAllInstalledPackages()
161 List<PackageInfo> workPackages = packageManager.getInstalledPackagesAsUser( in getAllInstalledPackages()
177 Context context, PackageManager packageManager, UserManager userManager, in getNumberOfEnabledApps() argument
188 collectConfigurableApps(packageManager, userManager, crossProfileApps); in getNumberOfEnabledApps()
/packages/apps/Settings/src/com/android/settings/display/
DAdaptiveSleepPreferenceController.java154 final PackageManager packageManager = context.getPackageManager(); in isAttentionServiceAvailable() local
155 final String resolvePackage = packageManager.getAttentionServicePackageName(); in isAttentionServiceAvailable()
161 final ResolveInfo resolveInfo = packageManager.resolveService(intent, in isAttentionServiceAvailable()
166 static boolean hasSufficientPermission(PackageManager packageManager) { in hasSufficientPermission() argument
167 final String attentionPackage = packageManager.getAttentionServicePackageName(); in hasSufficientPermission()
168 return attentionPackage != null && packageManager.checkPermission( in hasSufficientPermission()
DSmartAutoRotateController.java187 final PackageManager packageManager = context.getPackageManager(); in isRotationResolverServiceAvailable() local
188 final String resolvePackage = packageManager.getRotationResolverPackageName(); in isRotationResolverServiceAvailable()
194 final ResolveInfo resolveInfo = packageManager.resolveService(intent, in isRotationResolverServiceAvailable()
200 final PackageManager packageManager = context.getPackageManager(); in hasSufficientPermission() local
201 final String rotationPackage = packageManager.getRotationResolverPackageName(); in hasSufficientPermission()
202 return rotationPackage != null && packageManager.checkPermission( in hasSufficientPermission()
/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()

12345678910>>...12