/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | AbstractZenModeAutomaticRulePreferenceControllerTest.java | 50 private PackageManager mPm; field in AbstractZenModeAutomaticRulePreferenceControllerTest 66 when(mPm.getPackageUid(null, 0)).thenReturn(-1); in testGetSettingsActivity_configActivity() 67 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity() 70 .getSettingsActivity(mPm, rule, null); in testGetSettingsActivity_configActivity() 82 when(mPm.getPackageUid(null, 0)).thenReturn(-1); in testGetSettingsActivity_configActivity_wrongPackage() 83 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity_wrongPackage() 86 .getSettingsActivity(mPm, rule, null); in testGetSettingsActivity_configActivity_wrongPackage() 97 when(mPm.getPackageUid(null, 0)).thenReturn(-1); in testGetSettingsActivity_configActivity_unspecifiedOwner() 98 when(mPm.getPackageUid(mContext.getPackageName(), 0)).thenReturn(1); in testGetSettingsActivity_configActivity_unspecifiedOwner() 101 .getSettingsActivity(mPm, rule, null); in testGetSettingsActivity_configActivity_unspecifiedOwner() [all …]
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/ |
D | TargetPresentationGetter.java | 84 protected PackageManager mPm; field in TargetPresentationGetter 108 mPm.getResourcesForApplication(mAppInfo), mAppInfo.icon); in getIconBitmap() 115 drawable = mAppInfo.loadIcon(mPm); in getIconBitmap() 135 label = (String) mAppInfo.loadLabel(mPm); in getLabel() 172 mPm = context.getPackageManager(); in TargetPresentationGetter() 175 mHasSubstitutePermission = (PackageManager.PERMISSION_GRANTED == mPm.checkPermission( in TargetPresentationGetter() 197 mPm.getResourcesForApplication(mResolveInfo.resolvePackageName), in getIconSubstituteInternal() 217 return mResolveInfo.loadLabel(mPm).toString(); in getAppSubLabelInternal() 223 return mResolveInfo.getComponentInfo().loadLabel(mPm).toString(); in getAppLabelForSubstitutePermission() 244 mPm.getResourcesForApplication(mActivityInfo.applicationInfo), in getIconSubstituteInternal() [all …]
|
/packages/services/Car/tests/CarSecurityPermissionTest/src/com/android/car/content/pm/ |
D | CarPackageManagerPermissionTest.java | 41 private CarPackageManager mPm; field in CarPackageManagerPermissionTest 46 mPm = (CarPackageManager) mCar.getCarManager(Car.PACKAGE_SERVICE); in setUp() 56 assertThrows(SecurityException.class, () -> mPm.restartTask(0)); in testRestartTask() 63 assertThrows(SecurityException.class, () -> mPm.setAppBlockingPolicy(packageName, policy, in testSetAppBlockingPolicy() 69 assertThat(mPm.isActivityDistractionOptimized("blah", "someClass")).isFalse(); in testIsActivityDistractionOptimized() 74 assertThat(mPm.isServiceDistractionOptimized("blah", "someClass")).isFalse(); in testIsServiceDistractionOptimized() 79 assertThat(mPm.isActivityBackedBySafeActivity(new ComponentName("blah", "someClass"))) in testIsActivityBackedBySafeActivity() 85 assertThrows(SecurityException.class, () -> mPm.getTargetCarVersion("Y U NO THROW?")); in testGetTargetCarApiVersion()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/model/legacy/ |
D | PermissionApps.java | 59 private final PackageManager mPm; field in PermissionApps 85 mPm = mContext.getPackageManager(); in PermissionApps() 199 return mPm.getInstalledPackagesAsUser(pkgQueryFlags, user.getIdentifier()); in getPackageInfos() 202 final PackageInfo packageInfo = mPm.getPackageInfo(mPackageName, pkgQueryFlags); in getPackageInfos() 285 label = app.applicationInfo.loadLabel(mPm).toString(); in loadPermissionApps() 331 info = mPm.getPermissionGroupInfo(mGroupName, 0); in loadGroupInfo() 334 PermissionInfo permInfo = mPm.getPermissionInfo(mGroupName, 0); in loadGroupInfo() 346 mLabel = info.loadLabel(mPm); in loadGroupInfo() 347 mFullLabel = info.loadSafeLabel(mPm, 0, in loadGroupInfo() 350 mIcon = info.loadUnbadgedIcon(mPm); in loadGroupInfo() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/ |
D | DefaultAppInfo.java | 39 protected final PackageManager mPm; field in DefaultAppInfo 54 mPm = pm; in DefaultAppInfo() 65 mPm = pm; in DefaultAppInfo() 78 return componentInfo.loadLabel(mPm); in loadLabel() 80 final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser( in loadLabel() 82 return appInfo.loadLabel(mPm); in loadLabel() 88 return packageItemInfo.loadLabel(mPm); in loadLabel()
|
/packages/apps/Settings/src/com/android/settings/notification/history/ |
D | HistoryLoader.java | 40 private final PackageManager mPm; field in HistoryLoader 45 mPm = pm; in HistoryLoader() 72 info = mPm.getApplicationInfoAsUser( in load() 80 nhp.label = String.valueOf(mPm.getApplicationLabel(info)); in load() 81 nhp.icon = mPm.getUserBadgedIcon(mPm.getApplicationIcon(info), in load() 86 nhp.icon = mPm.getDefaultActivityIcon(); in load()
|
/packages/apps/Settings/src/com/android/settings/accessibility/ |
D | RestrictedPreferenceHelper.java | 58 private final PackageManager mPm; field in RestrictedPreferenceHelper 64 mPm = context.getPackageManager(); in RestrictedPreferenceHelper() 95 final CharSequence title = resolveInfo.loadLabel(mPm); in createAccessibilityServicePreferenceList() 101 Drawable icon = resolveInfo.loadIcon(mPm); in createAccessibilityServicePreferenceList() 115 final CharSequence intro = info.loadIntro(mPm); in createAccessibilityServicePreferenceList() 118 final String htmlDescription = info.loadHtmlDescription(mPm); in createAccessibilityServicePreferenceList() 157 final CharSequence title = activityInfo.loadLabel(mPm); in createAccessibilityActivityPreferenceList() 158 final String summary = info.loadSummary(mPm); in createAccessibilityActivityPreferenceList() 162 Drawable icon = activityInfo.loadIcon(mPm); in createAccessibilityActivityPreferenceList() 175 final CharSequence intro = info.loadIntro(mPm); in createAccessibilityActivityPreferenceList() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | AppButtonsPreferenceController.java | 115 private final PackageManager mPm; field in AppButtonsPreferenceController 150 mPm = activity.getPackageManager(); in AppButtonsPreferenceController() 158 mAppLaunchIntent = mPm.getLaunchIntentForPackage(mPackageName); in AppButtonsPreferenceController() 259 AsyncTask.execute(new DisableChangerRunnable(mPm, mAppEntry.info.packageName, in onClick() 279 if (mPm.isPackageStateProtected(mAppEntry.info.packageName, mUserId)) { in onClick() 297 AsyncTask.execute(new DisableChangerRunnable(mPm, mAppEntry.info.packageName, in handleActivityResult() 311 AsyncTask.execute(new DisableChangerRunnable(mPm, mAppEntry.info.packageName, in handleDialogClick() 372 mPackageInfo = mPm.getPackageInfo(mAppEntry.info.packageName, in retrieveAppEntry() 390 mAppLaunchIntent = mPm.getLaunchIntentForPackage(mPackageName); in updateOpenButton() 417 if (isSystemPackage(mActivity.getResources(), mPm, mPackageInfo)) { in updateUninstallButton() [all …]
|
/packages/services/Car/packages/CarDeveloperOptions/tests/unit/src/com/android/car/developeroptions/ |
D | CarDeveloperOptionsIntentTest.java | 44 private PackageManager mPm; field in CarDeveloperOptionsIntentTest 48 mPm = mContext.getPackageManager(); in setup() 53 List<ResolveInfo> results = mPm.queryIntentActivities(createSettingsPackageIntent(), in testAvailableIntentActivities_onlyAllowlisted() 67 List<ResolveInfo> results = mPm.queryIntentServices(createSettingsPackageIntent(), in testAvailableIntentServices_returnsZero() 79 List<ResolveInfo> results = mPm.queryBroadcastReceivers(createSettingsPackageIntent(), in testAvailableBroadcastReceivers_returnsZero() 91 List<ResolveInfo> results = mPm.queryIntentContentProviders(createSettingsPackageIntent(), in testAvailableContentProviders_returnsZero()
|
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | WorkPolicyInfoPreferenceController.java | 49 private final PackageManager mPm; field in WorkPolicyInfoPreferenceController 64 mPm = context.getPackageManager(); in WorkPolicyInfoPreferenceController() 66 mEnabled = mPm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN); in WorkPolicyInfoPreferenceController() 112 List<ResolveInfo> activities = mPm.queryIntentActivities(mIntent, /* flags= */ 0); in updateState() 121 ApplicationInfo appInfo = mPm.getApplicationInfo(adminPkgName, /* flags= */ 0); in updateState() 122 mAdminName = appInfo.loadLabel(mPm); in updateState()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/actions/ |
D | Action.java | 38 protected PackageManager mPm; field in Action 46 mPm = pm; in Action() 69 icon = mPm.getApplicationIcon(packageName); in getAppIcon() 91 appInfo = mPm.getApplicationInfo(packageName, 0); in getAppName() 92 appName = (String) mPm.getApplicationLabel(appInfo); in getAppName()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | ApplicationFeatureProviderImpl.java | 53 private final PackageManager mPm; field in ApplicationFeatureProviderImpl 65 mPm = pm; in ApplicationFeatureProviderImpl() 74 new CurrentUserAndManagedProfilePolicyInstalledAppCounter(mContext, mPm, callback); in calculateNumberOfPolicyInstalledApps() 85 new CurrentUserPolicyInstalledAppLister(mPm, mUm, callback); in listPolicyInstalledApps() 94 permissions, mPm, mPms, mDpm, callback); in calculateNumberOfAppsWithAdminGrantedPermissions() 106 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm, in listAppsWithAdminGrantedPermissions() 157 final ComponentInfo euicc = findEuiccService(mPm); in getKeepEnabledPackages() 183 if (mPm.getWellbeingPackageName() != null) { in getEnabledPackageAllowlist() 184 keepEnabledPackages.add(mPm.getWellbeingPackageName()); in getEnabledPackageAllowlist()
|
/packages/apps/Car/Settings/src/com/android/car/settingslib/applications/ |
D | ApplicationFeatureProviderImpl.java | 57 private final PackageManager mPm; field in ApplicationFeatureProviderImpl 69 mPm = pm; in ApplicationFeatureProviderImpl() 78 new CurrentUserAndManagedProfilePolicyInstalledAppCounter(mContext, mPm, callback); in calculateNumberOfPolicyInstalledApps() 89 new CurrentUserPolicyInstalledAppLister(mPm, mUm, callback); in listPolicyInstalledApps() 98 permissions, mPm, mPms, mDpm, callback); in calculateNumberOfAppsWithAdminGrantedPermissions() 110 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm, in listAppsWithAdminGrantedPermissions() 161 final ComponentInfo euicc = findEuiccService(mPm); in getKeepEnabledPackages() 187 if (mPm.getWellbeingPackageName() != null) { in getEnabledPackageAllowlist() 188 keepEnabledPackages.add(mPm.getWellbeingPackageName()); in getEnabledPackageAllowlist()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/ |
D | LegacyTypeTrackerTest.kt | 82 private val mPm = mock(PackageManager::class.java) constant 84 doReturn(true).`when`(mPm).hasSystemFeature(FEATURE_WIFI) in <lambda>() 85 doReturn(true).`when`(mPm).hasSystemFeature(FEATURE_WIFI_DIRECT) in <lambda>() 86 doReturn(true).`when`(mPm).hasSystemFeature(FEATURE_ETHERNET) in <lambda>() 87 doReturn(mPm).`when`(this).packageManager in <lambda>() 108 doReturn(false).`when`(mPm).hasSystemFeature(FEATURE_ETHERNET) in testSupportedTypes_NoEthernet() 109 doReturn(false).`when`(mPm).hasSystemFeature(FEATURE_USB_HOST) in testSupportedTypes_NoEthernet() 128 doReturn(false).`when`(mPm).hasSystemFeature(FEATURE_WIFI_DIRECT) in testSupportedTypes_NoWifiDirect()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 47 private final PackageManager mPm; field in EnterprisePrivacyFeatureProviderImpl 60 mPm = pm; in EnterprisePrivacyFeatureProviderImpl() 183 return mPm.getApplicationInfoAsUser(packageName, 0 /* flags */, MY_USER_ID) in getImeLabelIfOwnerSet() 184 .loadLabel(mPm).toString(); in getImeLabelIfOwnerSet() 268 final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, MY_USER_ID); in getParentalControlsIntent() 276 if (!mPm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)) { in getDeviceOwnerComponent() 310 final List<ResolveInfo> activities = mPm.queryIntentActivities(intent, 0); in getWorkPolicyInfoIntentDO() 334 final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, userId); in getWorkPolicyInfoIntentPO()
|
/packages/apps/Car/Settings/src/com/android/car/settings/common/ |
D | ExtraSettingsLoader.java | 65 private PackageManager mPm; field in ExtraSettingsLoader 69 mPm = context.getPackageManager(); in ExtraSettingsLoader() 79 mPm = pm; in setPackageManager() 96 List<ResolveInfo> results = mPm.queryIntentActivitiesAsUser(intent, in loadPreferences() 100 List<ResolveInfo> extra_settings_results = mPm.queryIntentActivitiesAsUser(intent, in loadPreferences() 138 Resources res = mPm.getResourcesForApplication(activityInfo.packageName); in loadPreferences() 146 title = activityInfo.loadLabel(mPm).toString(); in loadPreferences()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenRuleSelectionDialog.java | 62 private static PackageManager mPm; field in ZenRuleSelectionDialog 83 mPm = mContext.getPackageManager(); in show() 122 List<ResolveInfo> results = mPm.queryIntentActivities( in isRuleActivityValid() 124 return intent.resolveActivity(mPm) != null && results.size() > 0; in isRuleActivityValid() 129 ApplicationInfo info = mPm.getApplicationInfo(ri.packageName, 0); in bindType() 145 subtitle.setText(info.loadLabel(mPm)); in bindType() 216 getRuleInfo(mPm, ci); 252 return params[0].loadIcon(mPm); in doInBackground()
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/enterprise/apps/ |
D | ApplicationFeatureProviderImpl.java | 43 private final PackageManager mPm; field in ApplicationFeatureProviderImpl 51 mPm = pm; in ApplicationFeatureProviderImpl() 60 new CurrentUserAndManagedProfilePolicyInstalledAppCounter(mContext, mPm, callback); in calculateNumberOfPolicyInstalledApps() 71 new CurrentUserPolicyInstalledAppLister(mPm, mUm, callback); in listPolicyInstalledApps() 80 permissions, mPm, mPms, mDpm, callback); in calculateNumberOfAppsWithAdminGrantedPermissions() 92 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm, in listAppsWithAdminGrantedPermissions()
|
/packages/apps/Car/Settings/src/com/android/car/settings/system/ |
D | RegulatoryInfoPreferenceController.java | 36 private PackageManager mPm; field in RegulatoryInfoPreferenceController 41 mPm = context.getPackageManager(); in RegulatoryInfoPreferenceController() 51 return mPm.queryIntentActivities(INTENT_PROBE, /* flags= */ 0).isEmpty() in getAvailabilityStatus() 57 mPm = pm; in setPackageManager()
|
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/ |
D | MicPreferenceController.java | 37 private PackageManager mPm; field in MicPreferenceController 42 mPm = context.getPackageManager(); in MicPreferenceController() 53 PermissionGroupInfo groupInfo = mPm.getPermissionGroupInfo( in onCreateInternal() 56 Drawable icon = groupInfo.loadIcon(mPm); in onCreateInternal()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/notificationaccess/ |
D | NotificationAccessDetails.java | 74 private PackageManager mPm; field in NotificationAccessDetails 90 mPm = getPackageManager(); in onAttach() 96 listenerTargetSdk = mPm.getTargetSdkVersion(mComponentName.getPackageName()); in onAttach() 104 .setPm(mPm) in onAttach() 221 mPackageInfo = mPm.getPackageInfoAsUser(mPackageName, in retrieveAppEntry() 285 List<ResolveInfo> installedServices = mPm.queryIntentServicesAsUser( in loadNotificationListenerService() 293 mServiceName = info.loadLabel(mPm); in loadNotificationListenerService()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | UtilsTest.java | 59 private PackageManager mPm; field in UtilsTest 63 when(mContext.getPackageManager()).thenReturn(mPm); in setFixtures() 64 when(mContext.getSystemService(PackageManager.class)).thenReturn(mPm); in setFixtures() 207 when(mPm.getPackagesForUid(myUid)).thenReturn(new String[] {}); in testCheckCalledByPackage_emptyPackages() 223 when(mPm.getPackagesForUid(myUid)).thenReturn(new String[] {"Bond, James Bond"}); in testCheckCalledByPackage_wrongPackages() 237 when(mPm.getPackagesForUid(myUid)).thenReturn(new String[] { in testCheckCalledByPackage_ok()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/inputmethod/ |
D | VirtualKeyboardPreferenceControllerTest.java | 60 private PackageManager mPm; field in VirtualKeyboardPreferenceControllerTest 71 when(mContext.getPackageManager()).thenReturn(mPm); in setUp() 105 when(imis.get(0).loadLabel(mPm)).thenReturn("label"); in updateState_singleIme_setImeLabelToSummary() 125 when(imis.get(0).loadLabel(mPm)).thenReturn(label1); in updateState_multiImeWithMixedLocale_setImeLabelToSummary() 127 when(imis.get(1).loadLabel(mPm)).thenReturn(label2); in updateState_multiImeWithMixedLocale_setImeLabelToSummary()
|
/packages/apps/Car/Settings/src/com/android/car/settingslib/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 41 private final PackageManager mPm; field in EnterprisePrivacyFeatureProviderImpl 47 mPm = pm; in EnterprisePrivacyFeatureProviderImpl() 79 return mPm.getApplicationInfoAsUser(packageName, /* flags= */ 0, MY_USER_ID) in getImeLabelIfOwnerSet() 80 .loadLabel(mPm).toString(); in getImeLabelIfOwnerSet()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/ |
D | RegulatoryInfoPreferenceControllerTest.java | 56 private PackageManager mPm; field in RegulatoryInfoPreferenceControllerTest 67 mPreferenceController.setPackageManager(mPm); in setUp() 74 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasIntent_isAvailable() 84 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasNoIntent_isNotAvailable()
|