/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/Permission/tests/cts/permission/src/android/permission/cts/ |
D | UndefinedGroupPermissionTest.kt | 52 private var mPm: PackageManager? = null variable in android.permission.cts.UndefinedGroupPermissionTest 69 mPm = mContext?.packageManager in setup() 132 mPm!!.checkPermission(CAMERA, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 136 mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 140 mPm!!.checkPermission(TEST, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 151 mPm!!.checkPermission(CAMERA, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 155 mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 159 mPm!!.checkPermission(TEST, APP_PKG_NAME) in testCustomPermissionGrantedAlone() 186 mPm!!.grantRuntimePermission(APP_PKG_NAME, grantedPerm, Process.myUserHandle()) in testOtherGroupPermissionsNotGranted() 191 mPm!!.checkPermission(grantedPerm, APP_PKG_NAME) in testOtherGroupPermissionsNotGranted() [all …]
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/ |
D | TargetPresentationGetter.java | 85 protected PackageManager mPm; field in TargetPresentationGetter 109 mPm.getResourcesForApplication(mAppInfo), mAppInfo.icon); in getIconBitmap() 116 drawable = mAppInfo.loadIcon(mPm); in getIconBitmap() 136 label = (String) mAppInfo.loadLabel(mPm); in getLabel() 173 mPm = context.getPackageManager(); in TargetPresentationGetter() 176 mHasSubstitutePermission = (PackageManager.PERMISSION_GRANTED == mPm.checkPermission( in TargetPresentationGetter() 198 mPm.getResourcesForApplication(mResolveInfo.resolvePackageName), in getIconSubstituteInternal() 218 return mResolveInfo.loadLabel(mPm).toString(); in getAppSubLabelInternal() 224 return mResolveInfo.getComponentInfo().loadLabel(mPm).toString(); in getAppLabelForSubstitutePermission() 245 mPm.getResourcesForApplication(mActivityInfo.applicationInfo), in getIconSubstituteInternal() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/ |
D | RegulatoryInfoPreferenceControllerTest.java | 57 private PackageManager mPm; field in RegulatoryInfoPreferenceControllerTest 68 mPreferenceController.setPackageManager(mPm); in setUp() 75 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasIntent_isAvailable() 87 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasIntent_isAvailable_zoneWrite() 99 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasIntent_isAvailable_zoneRead() 112 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasIntent_isAvailable_zoneHidden() 123 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasNoIntent_isNotAvailable() 134 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasNoIntent_isNotAvailable_zoneWrite() 146 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasNoIntent_isNotAvailable_zoneRead() 158 when(mPm.queryIntentActivities(any(Intent.class), eq(0))) in hasNoIntent_isNotAvailable_zoneHidden()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | DeviceConfigUtilsTest.java | 99 @Mock private PackageManager mPm; field in DeviceConfigUtilsTest 110 doReturn(mPm).when(mContext).getPackageManager(); in setUp() 112 doThrow(NameNotFoundException.class).when(mPm).getPackageInfo(anyString(), anyInt()); in setUp() 113 doReturn(mPackageInfo).when(mPm).getPackageInfo(eq(TEST_PACKAGE_NAME), anyInt()); in setUp() 114 doReturn(mApexPackageInfo).when(mPm).getPackageInfo(eq(TEST_APEX_PACKAGE_NAME), anyInt()); in setUp() 124 doReturn(Arrays.asList(ri)).when(mPm).queryIntentActivities(argThat( in setUp() 260 verify(mPm, never()).getPackageInfo(anyString(), anyInt()); in testIsFeatureEnabledFeatureDefaultDisabled() 279 verify(mPm, never()).getPackageInfo(anyString(), anyInt()); in testIsFeatureEnabledFeatureForceEnabled() 298 verify(mPm, never()).getPackageInfo(anyString(), anyInt()); in testIsFeatureEnabledFeatureForceDisabled() 303 doThrow(NameNotFoundException.class).when(mPm).getPackageInfo(anyString(), anyInt()); in testFeatureIsEnabledWithException() [all …]
|
/packages/apps/Settings/src/com/android/settings/accessibility/ |
D | AccessibilityActivityPreference.java | 51 private final PackageManager mPm; field in AccessibilityActivityPreference 59 mPm = context.getPackageManager(); in AccessibilityActivityPreference() 62 mLabel = a11yShortcutInfo.getActivityInfo().loadLabel(mPm); in AccessibilityActivityPreference() 66 setSummary(a11yShortcutInfo.loadSummary(mPm)); in AccessibilityActivityPreference() 111 serviceIcon = activityInfo.loadIcon(mPm); in getA11yActivityIcon() 119 final CharSequence intro = mA11yShortcutInfo.loadIntro(mPm); in setupDataForOpenFragment() 120 final CharSequence description = mA11yShortcutInfo.loadDescription(mPm); in setupDataForOpenFragment() 121 final String htmlDescription = mA11yShortcutInfo.loadHtmlDescription(mPm); in setupDataForOpenFragment()
|
D | AccessibilityServicePreference.java | 48 private final PackageManager mPm; field in AccessibilityServicePreference 57 mPm = context.getPackageManager(); in AccessibilityServicePreference() 64 setTitle(mA11yServiceInfo.getResolveInfo().loadLabel(mPm)); in AccessibilityServicePreference() 105 serviceIcon = resolveInfo.loadIcon(mPm); in getA11yServiceIcon() 113 final CharSequence intro = mA11yServiceInfo.loadIntro(mPm); in setupDataForOpenFragment() 116 final String htmlDescription = mA11yServiceInfo.loadHtmlDescription(mPm); in setupDataForOpenFragment()
|
/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/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/services/Car/packages/CarDeveloperOptions/tests/unit/src/com/android/car/developeroptions/ |
D | CarDeveloperOptionsIntentTest.java | 43 private PackageManager mPm; field in CarDeveloperOptionsIntentTest 47 mPm = mContext.getPackageManager(); in setup() 52 List<ResolveInfo> results = mPm.queryIntentActivities(createSettingsPackageIntent(), in testAvailableIntentActivities_onlyAllowlisted() 66 List<ResolveInfo> results = mPm.queryIntentServices(createSettingsPackageIntent(), in testAvailableIntentServices_returnsZero() 78 List<ResolveInfo> results = mPm.queryBroadcastReceivers(createSettingsPackageIntent(), in testAvailableBroadcastReceivers_returnsZero() 90 List<ResolveInfo> results = mPm.queryIntentContentProviders(createSettingsPackageIntent(), in testAvailableContentProviders_returnsZero()
|
/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/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/Settings/src/com/android/settings/applications/appinfo/ |
D | AppButtonsPreferenceController.java | 114 private final PackageManager mPm; field in AppButtonsPreferenceController 148 mPm = activity.getPackageManager(); in AppButtonsPreferenceController() 156 mAppLaunchIntent = mPm.getLaunchIntentForPackage(mPackageName); in AppButtonsPreferenceController() 250 AsyncTask.execute(new DisableChangerRunnable(mPm, mAppEntry.info.packageName, in onClick() 270 if (mPm.isPackageStateProtected(mAppEntry.info.packageName, mUserId)) { in onClick() 298 AsyncTask.execute(new DisableChangerRunnable(mPm, mAppEntry.info.packageName, in handleDialogClick() 354 mPackageInfo = mPm.getPackageInfo(mAppEntry.info.packageName, in retrieveAppEntry() 372 mAppLaunchIntent = mPm.getLaunchIntentForPackage(mPackageName); in updateOpenButton() 399 if (isSystemPackage(mActivity.getResources(), mPm, mPackageInfo)) { in updateUninstallButton() 433 ComponentName currentDefaultHome = mPm.getHomeActivities(homeActivities); in updateUninstallButton() [all …]
|
/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 getDefaultAvailabilityStatus() 57 mPm = pm; in setPackageManager()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | ApplicationFeatureProviderImpl.java | 57 private final PackageManager mPm; field in ApplicationFeatureProviderImpl 76 mPm = pm; in ApplicationFeatureProviderImpl() 87 new CurrentUserAndManagedProfilePolicyInstalledAppCounter(mContext, mPm, callback); in calculateNumberOfPolicyInstalledApps() 98 new CurrentUserPolicyInstalledAppLister(mPm, mUm, callback); in listPolicyInstalledApps() 107 permissions, mPm, mPms, mDpm, callback); in calculateNumberOfAppsWithAdminGrantedPermissions() 119 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm, in listAppsWithAdminGrantedPermissions() 170 final ComponentInfo euicc = findEuiccService(mPm); in getKeepEnabledPackages() 205 if (mPm.getWellbeingPackageName() != null) { in getEnabledPackageAllowlist() 206 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/apps/TvSettings/Settings/src/com/android/tv/settings/enterprise/ |
D | EnterprisePrivacyFeatureProviderImpl.java | 47 private final PackageManager mPm; field in EnterprisePrivacyFeatureProviderImpl 60 mPm = pm; in EnterprisePrivacyFeatureProviderImpl() 180 return mPm.getApplicationInfoAsUser(packageName, 0 /* flags */, MY_USER_ID) in getImeLabelIfOwnerSet() 181 .loadLabel(mPm).toString(); in getImeLabelIfOwnerSet() 265 final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, MY_USER_ID); in getParentalControlsIntent() 273 if (!mPm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)) { in getDeviceOwnerComponent() 307 final List<ResolveInfo> activities = mPm.queryIntentActivities(intent, 0); in getWorkPolicyInfoIntentDO() 331 final List<ResolveInfo> activities = mPm.queryIntentActivitiesAsUser(intent, 0, userId); in getWorkPolicyInfoIntentPO()
|
/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/modules/Connectivity/tests/unit/java/com/android/server/ |
D | LegacyTypeTrackerTest.kt | 82 private val mPm = mock(PackageManager::class.java) constant in com.android.server.LegacyTypeTrackerTest 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/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/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/TvSettings/Settings/src/com/android/tv/settings/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/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/Settings/src/com/android/settings/notification/zen/ |
D | ZenRuleSelectionDialog.java | 65 private static PackageManager mPm; field in ZenRuleSelectionDialog 86 mPm = mContext.getPackageManager(); in show() 125 List<ResolveInfo> results = mPm.queryIntentActivities( in isRuleActivityValid() 127 return intent.resolveActivity(mPm) != null && results.size() > 0; in isRuleActivityValid() 132 ApplicationInfo info = mPm.getApplicationInfo(ri.packageName, 0); in bindType() 148 subtitle.setText(info.loadLabel(mPm)); in bindType() 229 getRuleInfo(mPm, ci); 265 return params[0].loadIcon(mPm); in doInBackground()
|