/packages/apps/Settings/src/com/android/settings/ |
D | SettingsInitialize.java | 19 import static android.content.pm.PackageManager.GET_ACTIVITIES; 20 import static android.content.pm.PackageManager.GET_META_DATA; 21 import static android.content.pm.PackageManager.GET_RESOLVED_FILTER; 22 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS; 30 import android.content.pm.PackageManager; 31 import android.content.pm.ResolveInfo; 32 import android.content.pm.ShortcutInfo; 33 import android.content.pm.ShortcutManager; 34 import android.content.pm.UserInfo; 63 final PackageManager pm = context.getPackageManager(); in onReceive() local [all …]
|
/packages/modules/adb/daemon/ |
D | property_monitor_test.cpp | 49 static std::thread SpawnThread(PropertyMonitor* pm) { in SpawnThread() argument 50 return std::thread([pm]() { in SpawnThread() 51 pm->Run(); in SpawnThread() 55 static std::function<void()> RegisterExitCallback(PropertyMonitor* pm) { in RegisterExitCallback() argument 58 pm->Add(prop_name, [](std::string value) { return value != "1"; }); in RegisterExitCallback() 64 static void RegisterCallback(PropertyMonitor* pm, PropertyChanges* output, in RegisterCallback() argument 66 pm->Add(property_name, [output, property_name](std::string value) { in RegisterCallback() 75 PropertyMonitor pm; in TEST() local 78 auto exit_fn = RegisterExitCallback(&pm); in TEST() 82 RegisterCallback(&pm, &output, foo); in TEST() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/managedomainurls/ |
D | DomainUrlsUtilsTest.java | 27 import android.content.pm.IntentFilterVerificationInfo; 28 import android.content.pm.PackageManager; 102 PackageManager pm = mock(PackageManager.class); in getHandledDomains_includeIntentFilterVerificationInfoDomains() local 107 when(pm.getIntentFilterVerifications(TEST_PACKAGE)).thenReturn(Arrays.asList(info)); in getHandledDomains_includeIntentFilterVerificationInfoDomains() 109 assertThat(DomainUrlsUtils.getHandledDomains(pm, TEST_PACKAGE)).hasSize(1); in getHandledDomains_includeIntentFilterVerificationInfoDomains() 110 assertThat(DomainUrlsUtils.getHandledDomains(pm, TEST_PACKAGE)).contains(domain); in getHandledDomains_includeIntentFilterVerificationInfoDomains() 115 PackageManager pm = mock(PackageManager.class); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() local 122 when(pm.getAllIntentFilters(TEST_PACKAGE)).thenReturn(Arrays.asList(filter)); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 124 assertThat(DomainUrlsUtils.getHandledDomains(pm, TEST_PACKAGE)).hasSize(1); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 125 assertThat(DomainUrlsUtils.getHandledDomains(pm, TEST_PACKAGE)).contains(domain); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() [all …]
|
/packages/apps/Stk/src/com/android/stk/ |
D | StkAppInstaller.java | 25 import android.content.pm.IPackageManager; 26 import android.content.pm.PackageManager; 44 IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); in installOrUpdate() local 45 if (pm != null) { in installOrUpdate() 52 pm.overrideLabelAndIcon(component, label, icon, userId); in installOrUpdate() 54 pm.restoreLabelAndIcon(component, userId); in installOrUpdate() 60 setAppState(pm, component, userId, true); in installOrUpdate() 68 IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); in uninstall() local 69 if (pm != null) { in uninstall() 72 setAppState(pm, component, context.getUserId(), false); in uninstall() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/auto/ |
D | AutoAllAppPermissionsFragment.java | 21 import android.content.pm.ApplicationInfo; 22 import android.content.pm.PackageInfo; 23 import android.content.pm.PackageItemInfo; 24 import android.content.pm.PackageManager; 25 import android.content.pm.PermissionGroupInfo; 26 import android.content.pm.PermissionInfo; 117 PackageManager pm = getContext().getPackageManager(); in updateUi() local 133 perm = pm.getPermissionInfo(info.requestedPermissions[i], /* flags= */ 0); in updateUi() 158 PackageItemInfo group = getGroup(Utils.getGroupOfPermission(perm), pm); in updateUi() 166 PreferenceGroup pref = findOrCreate(group, pm, prefs); in updateUi() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/ |
D | AllAppPermissionsFragment.java | 24 import android.content.pm.ApplicationInfo; 25 import android.content.pm.PackageInfo; 26 import android.content.pm.PackageItemInfo; 27 import android.content.pm.PackageManager; 28 import android.content.pm.PackageManager.NameNotFoundException; 29 import android.content.pm.PermissionGroupInfo; 30 import android.content.pm.PermissionInfo; 132 PackageManager pm = getActivity().getPackageManager(); in updateUi() local 135 final Drawable icon = appInfo.loadIcon(pm); in updateUi() 136 final CharSequence label = appInfo.loadLabel(pm); in updateUi() [all …]
|
/packages/services/Car/tests/carservice_test/src/com/android/car/ |
D | TestAppBlockingPolicyService.java | 18 import android.car.content.pm.AppBlockingPackageInfo; 19 import android.car.content.pm.CarAppBlockingPolicy; 20 import android.car.content.pm.CarAppBlockingPolicyService; 21 import android.content.pm.PackageManager; 22 import android.content.pm.PackageManager.NameNotFoundException; 23 import android.content.pm.Signature; 50 PackageManager pm = getPackageManager(); in getAppBlockingPolicy() local 54 signatures = pm.getPackageInfo(packageName, in getAppBlockingPolicy()
|
/packages/apps/Settings/src/com/android/settings/emergency/ |
D | MoreSettingsPreferenceController.java | 19 import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS; 20 import static android.content.pm.PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS; 21 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY; 25 import android.content.pm.ApplicationInfo; 26 import android.content.pm.PackageManager; 27 import android.content.pm.ResolveInfo; 128 final PackageManager pm = mContext.getPackageManager(); in getIcon() local 129 final ApplicationInfo appInfo = pm.getApplicationInfo( in getIcon() 143 final PackageManager pm = mContext.getPackageManager(); in getButtonText() local 144 final ApplicationInfo appInfo = pm.getApplicationInfo( in getButtonText() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | PreBootReceiver.java | 28 import android.content.pm.PackageManager; 50 final PackageManager pm = context.getPackageManager(); in onReceive() local 51 if (pm == null) { in onReceive() 63 context.getPackageName()).getValidOverlay(pm); in onReceive() 75 overlayRes = pm.getResourcesForApplication(overlayPkg); in onReceive() 84 setComponentEnabledByConfigResources(pm, packageName, LAUNCHER_TARGET_CLASS, in onReceive() 86 setComponentEnabledByConfigResources(pm, packageName, DOWNLOADS_TARGET_CLASS, in onReceive() 90 private static void setComponentEnabledByConfigResources(PackageManager pm, String packageName, in setComponentEnabledByConfigResources() argument 103 pm.setComponentEnabledSetting(component, enabled in setComponentEnabledByConfigResources()
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | PackageManagerHelper.java | 19 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY; 27 import android.content.pm.ApplicationInfo; 28 import android.content.pm.LauncherActivityInfo; 29 import android.content.pm.LauncherApps; 30 import android.content.pm.PackageInfo; 31 import android.content.pm.PackageManager; 32 import android.content.pm.PackageManager.NameNotFoundException; 33 import android.content.pm.ResolveInfo; 254 PackageManager pm = context.getPackageManager(); in isSystemApp() local 258 ResolveInfo info = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); in isSystemApp() [all …]
|
/packages/apps/Tag/src/com/android/apps/tag/record/ |
D | RecordUtils.java | 25 import android.content.pm.ActivityInfo; 26 import android.content.pm.PackageManager; 27 import android.content.pm.ResolveInfo; 66 PackageManager pm = activity.getPackageManager(); in getViewsForIntent() local 68 List<ResolveInfo> activities = pm.queryIntentActivities(intent, flags); in getViewsForIntent() 75 return buildActivityView(activity, activities.get(0), pm, inflater, parent, listener, in getViewsForIntent() 95 container.addView(buildActivityView(activity, resolveInfo, pm, inflater, container, in getViewsForIntent() 105 …rivate static View buildActivityView(Activity activity, ResolveInfo resolveInfo, PackageManager pm, in buildActivityView() argument 118 icon.setImageDrawable(resolveInfo.loadIcon(pm)); in buildActivityView() 121 text.setText(resolveInfo.loadLabel(pm)); in buildActivityView()
|
/packages/apps/Settings/src/com/android/settings/accounts/ |
D | AccountTypePreferenceLoader.java | 24 import android.content.pm.ActivityInfo; 25 import android.content.pm.ApplicationInfo; 26 import android.content.pm.PackageManager; 27 import android.content.pm.PackageManager.NameNotFoundException; 28 import android.content.pm.ResolveInfo; 118 final PackageManager pm = mFragment.getActivity().getPackageManager(); in updatePreferenceIntents() local 147 ResolveInfo ri = pm.resolveActivityAsUser(intent, in updatePreferenceIntents() 166 if (isSafeIntent(pm, prefIntent, acccountType)) { in updatePreferenceIntents() 189 private boolean isSafeIntent(PackageManager pm, Intent intent, String acccountType) { in isSafeIntent() argument 192 ResolveInfo resolveInfo = pm.resolveActivityAsUser(intent, 0, mUserHandle.getIdentifier()); in isSafeIntent() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | Utils.java | 34 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT; 35 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT; 36 import static android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT; 37 import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED; 38 import static android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED; 39 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY; 54 import android.content.pm.ApplicationInfo; 55 import android.content.pm.PackageInfo; 56 import android.content.pm.PackageItemInfo; 57 import android.content.pm.PackageManager; [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/ |
D | CarrierPreferenceControllerTest.java | 36 import android.content.pm.PackageManager; 37 import android.content.pm.ResolveInfo; 131 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityFound_openCarrierSettingActivity() local 132 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 133 doReturn(new ResolveInfo()).when(pm).resolveActivity(any(Intent.class), anyInt()); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 152 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityNotFound_DoNothing() local 153 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityNotFound_DoNothing() 154 doReturn(null).when(pm).resolveActivity(any(Intent.class), anyInt()); in handlePreferenceClick_activityNotFound_DoNothing() 166 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityNotConfigured_DoNothing() local 167 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityNotConfigured_DoNothing() [all …]
|
/packages/apps/Settings/src/com/android/settings/security/trustagent/ |
D | TrustAgentManager.java | 25 import android.content.pm.PackageManager; 26 import android.content.pm.ResolveInfo; 82 public boolean shouldProvideTrust(ResolveInfo resolveInfo, PackageManager pm) { in shouldProvideTrust() argument 84 if (pm.checkPermission(PERMISSION_PROVIDE_AGENT, packageName) in shouldProvideTrust() 111 final PackageManager pm = context.getPackageManager(); in getActiveTrustAgents() local 114 final List<ResolveInfo> resolveInfos = pm.queryIntentServices(TRUST_AGENT_INTENT, in getActiveTrustAgents() 123 if (resolveInfo.serviceInfo == null || !shouldProvideTrust(resolveInfo, pm)) { in getActiveTrustAgents() 127 getSettingsComponent(pm, resolveInfo); in getActiveTrustAgents() 151 private TrustAgentComponentInfo getSettingsComponent(PackageManager pm, in getSettingsComponent() argument 162 parser = resolveInfo.serviceInfo.loadXmlMetaData(pm, TRUST_AGENT_META_DATA); in getSettingsComponent() [all …]
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | RegisteredComponentCache.java | 27 import android.content.pm.ActivityInfo; 28 import android.content.pm.PackageManager; 29 import android.content.pm.ResolveInfo; 30 import android.content.pm.PackageManager.NameNotFoundException; 147 PackageManager pm; in generateComponentsList() local 150 pm = mContext.createPackageContextAsUser("android", 0, in generateComponentsList() 157 List<ResolveInfo> resolveInfos = pm.queryIntentActivitiesAsUser(new Intent(mAction), in generateComponentsList() 161 parseComponentInfo(pm, resolveInfo, components); in generateComponentsList() 178 void parseComponentInfo(PackageManager pm, ResolveInfo info, in parseComponentInfo() argument 184 parser = ai.loadXmlMetaData(pm, mMetaDataName); in parseComponentInfo() [all …]
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestPackageManager.java | 20 import android.content.pm.ActivityInfo; 21 import android.content.pm.ApplicationInfo; 22 import android.content.pm.PackageManager; 23 import android.content.pm.ProviderInfo; 25 import android.content.pm.ResolveInfo; 57 TestPackageManager pm = Mockito.mock( in create() local 59 pm.contentProviders = new HashMap<>(); in create() 60 return pm; in create()
|
/packages/apps/Settings/src/com/android/settings/utils/ |
D | ZenServiceListing.java | 23 import android.content.pm.ActivityInfo; 24 import android.content.pm.ComponentInfo; 25 import android.content.pm.PackageManager; 26 import android.content.pm.ResolveInfo; 27 import android.content.pm.ServiceInfo; 93 PackageManager pm) { in getServices() argument 96 List<ResolveInfo> installedServices = pm.queryIntentServicesAsUser( in getServices() 119 PackageManager pm) { in getActivities() argument 122 List<ResolveInfo> resolveInfos = pm.queryIntentActivitiesAsUser( in getActivities()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | AbstractZenModeAutomaticRulePreferenceController.java | 25 import android.content.pm.ActivityInfo; 26 import android.content.pm.ComponentInfo; 27 import android.content.pm.PackageManager; 28 import android.content.pm.ServiceInfo; 91 public static ZenRuleInfo getRuleInfo(PackageManager pm, ComponentInfo ci) { in getRuleInfo() argument 99 final ComponentName configurationActivity = getSettingsActivity(pm, null, ci); in getRuleInfo() 108 ri.packageLabel = ci.applicationInfo.loadLabel(pm); in getRuleInfo() 117 protected static ComponentName getSettingsActivity(PackageManager pm, AutomaticZenRule rule, in getSettingsActivity() argument 143 int ownerUid = pm.getPackageUid(owner, 0); in getSettingsActivity() 144 int configActivityOwnerUid = pm.getPackageUid(settingsActivity.getPackageName(), 0); in getSettingsActivity()
|
/packages/apps/Settings/src/com/android/settings/shortcut/ |
D | ShortcutsUpdateTask.java | 25 import android.content.pm.PackageManager; 26 import android.content.pm.ResolveInfo; 27 import android.content.pm.ShortcutInfo; 28 import android.content.pm.ShortcutManager; 45 PackageManager pm = mContext.getPackageManager(); in doInBackground() local 54 ResolveInfo ri = pm.resolveActivity(new Intent(SHORTCUT_PROBE).setComponent(cn), 0); in doInBackground() 59 .setShortLabel(ri.loadLabel(pm)).build()); in doInBackground()
|
/packages/apps/Settings/src/com/android/settings/vpn2/ |
D | AppPreference.java | 21 import android.content.pm.PackageInfo; 22 import android.content.pm.PackageManager; 57 PackageManager pm = userContext.getPackageManager(); in AppPreference() local 61 PackageInfo pkgInfo = pm.getPackageInfo(mPackageName, 0 /* flags */); in AppPreference() 63 icon = pkgInfo.applicationInfo.loadIcon(pm); in AppPreference() 70 icon = pm.getDefaultActivityIcon(); in AppPreference() 102 PackageManager pm = getUserContext().getPackageManager(); in getPackageInfo() local 103 return pm.getPackageInfo(mPackageName, 0 /* flags */); in getPackageInfo()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/pictureinpicture/ |
D | PictureInPictureSettings.java | 18 import static android.content.pm.PackageManager.GET_ACTIVITIES; 23 import android.content.pm.ActivityInfo; 24 import android.content.pm.ApplicationInfo; 25 import android.content.pm.PackageInfo; 26 import android.content.pm.PackageManager; 27 import android.content.pm.UserInfo; 72 public AppComparator(PackageManager pm) { in AppComparator() argument 73 mPm = pm; in AppComparator() 124 public PictureInPictureSettings(PackageManager pm, UserManager um) { in PictureInPictureSettings() argument 125 mPackageManager = pm; in PictureInPictureSettings()
|
/packages/services/Car/service/src/com/android/car/pm/ |
D | CarAppMetadataReader.java | 16 package com.android.car.pm; 20 import android.content.pm.ActivityInfo; 21 import android.content.pm.PackageInfo; 22 import android.content.pm.PackageManager; 23 import android.content.pm.PackageManager.NameNotFoundException; 60 final PackageManager pm = context.getPackageManager(); in findDistractionOptimizedActivitiesAsUser() local 66 pm.getPackageInfoAsUser( in findDistractionOptimizedActivitiesAsUser()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/ |
D | StorageAsyncLoader.java | 19 import static android.content.pm.ApplicationInfo.CATEGORY_AUDIO; 20 import static android.content.pm.ApplicationInfo.CATEGORY_GAME; 21 import static android.content.pm.ApplicationInfo.CATEGORY_IMAGE; 22 import static android.content.pm.ApplicationInfo.CATEGORY_VIDEO; 26 import android.content.pm.ApplicationInfo; 27 import android.content.pm.PackageManager; 28 import android.content.pm.PackageManager.NameNotFoundException; 29 import android.content.pm.UserInfo; 64 String uuid, StorageStatsSource source, PackageManager pm) { in StorageAsyncLoader() argument 69 mPackageManager = pm; in StorageAsyncLoader()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/managedomainurls/ |
D | DomainUrlsUtils.java | 22 import android.content.pm.IntentFilterVerificationInfo; 23 import android.content.pm.PackageManager; 38 PackageManager pm = context.getPackageManager(); in getDomainsSummary() local 41 int domainStatus = pm.getIntentVerificationStatusAsUser(packageName, userId); in getDomainsSummary() 57 public static ArraySet<String> getHandledDomains(PackageManager pm, String packageName) { in getHandledDomains() argument 58 List<IntentFilterVerificationInfo> iviList = pm.getIntentFilterVerifications(packageName); in getHandledDomains() 59 List<IntentFilter> filters = pm.getAllIntentFilters(packageName); in getHandledDomains()
|