Home
last modified time | relevance | path

Searched refs:pm (Results 1 – 25 of 2284) sorted by relevance

12345678910>>...92

/packages/apps/Settings/src/com/android/settings/
DSettingsInitialize.java19 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;
67 final PackageManager pm = context.getPackageManager(); in onReceive() local
[all …]
/packages/modules/adb/daemon/
Dproperty_monitor_test.cpp49 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/services/Car/car-builtin-lib/src/android/car/builtin/content/pm/
DPackageManagerHelper.java17 package android.car.builtin.content.pm;
28 import android.content.pm.ApplicationInfo;
29 import android.content.pm.ComponentInfo;
30 import android.content.pm.IPackageManager;
31 import android.content.pm.PackageInfo;
32 import android.content.pm.PackageManager;
101 public static PackageInfo getPackageInfoAsUser(@NonNull PackageManager pm, in getPackageInfoAsUser() argument
104 return pm.getPackageInfoAsUser(packageName, packageInfoFlags, userId); in getPackageInfoAsUser()
109 public static int getPackageUidAsUser(@NonNull PackageManager pm, @NonNull String packageName, in getPackageUidAsUser() argument
111 return pm.getPackageUidAsUser(packageName, userId); in getPackageUidAsUser()
[all …]
/packages/apps/Stk/src/com/android/stk/
DStkAppInstaller.java25 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/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/
DDefaultAppInfo.java22 import android.content.pm.ApplicationInfo;
23 import android.content.pm.ComponentInfo;
24 import android.content.pm.PackageItemInfo;
25 import android.content.pm.PackageManager;
42 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn) { in DefaultAppInfo() argument
43 this(context, pm, uid, cn, null /* summary */, true /* enabled */); in DefaultAppInfo()
46 public DefaultAppInfo(Context context, PackageManager pm, int uid, PackageItemInfo info) { in DefaultAppInfo() argument
47 this(context, pm, uid, info, null /* summary */, true /* enabled */); in DefaultAppInfo()
50 public DefaultAppInfo(Context context, PackageManager pm, int uid, ComponentName cn, in DefaultAppInfo() argument
54 mPm = pm; in DefaultAppInfo()
[all …]
DDreamBackend.java23 import android.content.pm.PackageManager;
24 import android.content.pm.ResolveInfo;
25 import android.content.pm.ServiceInfo;
121 PackageManager pm = mContext.getPackageManager(); in getDreamInfos() local
123 List<ResolveInfo> resolveInfos = pm.queryIntentServices(dreamIntent, in getDreamInfos()
132 dreamInfo.caption = resolveInfo.loadLabel(pm); in getDreamInfos()
133 dreamInfo.icon = resolveInfo.loadIcon(pm); in getDreamInfos()
136 dreamInfo.settingsComponentName = getSettingsComponentName(pm, resolveInfo); in getDreamInfos()
158 PackageManager pm = mContext.getPackageManager(); in getActiveDreamName() local
160 ServiceInfo ri = pm.getServiceInfo(cn, 0); in getActiveDreamName()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/auto/
DAutoAllAppPermissionsFragment.java23 import android.content.pm.ApplicationInfo;
24 import android.content.pm.PackageInfo;
25 import android.content.pm.PackageItemInfo;
26 import android.content.pm.PackageManager;
27 import android.content.pm.PermissionGroupInfo;
28 import android.content.pm.PermissionInfo;
120 PackageManager pm = getContext().getPackageManager(); in updateUi() local
136 perm = pm.getPermissionInfo(info.requestedPermissions[i], /* flags= */ 0); in updateUi()
161 PackageItemInfo group = getGroup(Utils.getGroupOfPermission(perm), pm); in updateUi()
169 PreferenceGroup pref = findOrCreate(group, pm, prefs); in updateUi()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/util/
DPartner.java19 import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
22 import android.content.pm.PackageManager;
23 import android.content.pm.PackageManager.NameNotFoundException;
24 import android.content.pm.ResolveInfo;
45 public static Partner get(PackageManager pm) { in get() argument
46 return get(pm, ACTION_PARTNER_CUSTOMIZATION); in get()
52 public static Partner get(PackageManager pm, String action) { in get() argument
53 Pair<String, Resources> apkInfo = findSystemApk(action, pm); in get()
103 private static Pair<String, Resources> findSystemApk(String action, PackageManager pm) { in findSystemApk() argument
105 for (ResolveInfo info : pm.queryBroadcastReceivers(intent, MATCH_SYSTEM_ONLY)) { in findSystemApk()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/
DAllAppPermissionsFragment.java26 import android.content.pm.ApplicationInfo;
27 import android.content.pm.PackageInfo;
28 import android.content.pm.PackageItemInfo;
29 import android.content.pm.PackageManager;
30 import android.content.pm.PackageManager.NameNotFoundException;
31 import android.content.pm.PermissionGroupInfo;
32 import android.content.pm.PermissionInfo;
134 PackageManager pm = getActivity().getPackageManager(); in updateUi() local
137 final Drawable icon = appInfo.loadIcon(pm); in updateUi()
138 final CharSequence label = appInfo.loadLabel(pm); in updateUi()
[all …]
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/
DAppUtils.java24 import android.content.pm.ApplicationInfo;
25 import android.content.pm.PackageInfo;
26 import android.content.pm.PackageManager;
27 import android.content.pm.ResolveInfo;
73 IUsbManager usbManager, PackageManager pm, Context context) { in getLaunchByDefaultSummary() argument
75 boolean hasPreferred = hasPreferredActivities(pm, packageName) in getLaunchByDefaultSummary()
77 int status = pm.getIntentVerificationStatusAsUser(packageName, UserHandle.myUserId()); in getLaunchByDefaultSummary()
86 public static boolean hasPreferredActivities(PackageManager pm, String packageName) { in hasPreferredActivities() argument
91 pm.getPreferredActivities(intentList, prefActList, packageName); in hasPreferredActivities()
144 public static boolean isMainlineModule(PackageManager pm, String packageName) { in isMainlineModule() argument
[all …]
/packages/apps/Camera2/src/com/android/camera/
DSetActivitiesCameraReceiver.java23 import android.content.pm.PackageManager;
53 PackageManager pm = context.getPackageManager(); in hasCamera() local
54 return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) in hasCamera()
55 || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT) in hasCamera()
56 || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_EXTERNAL); in hasCamera()
60 PackageManager pm = context.getPackageManager(); in hasBackCamera() local
61 return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); in hasBackCamera()
66 PackageManager pm = context.getPackageManager(); in setComponent() local
70 pm.setComponentEnabledSetting(name, in setComponent()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DTestAppBlockingPolicyService.java18 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/DocumentsUI/src/com/android/documentsui/
DPreBootReceiver.java28 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/Settings/src/com/android/settings/emergency/
DMoreSettingsPreferenceController.java19 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/Tag/src/com/android/apps/tag/record/
DRecordUtils.java25 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/services/Car/service/src/com/android/car/pm/
DCarAppMetadataReader.java16 package com.android.car.pm;
18 import static android.car.content.pm.CarPackageManager.DRIVING_SAFETY_ACTIVITY_METADATA_REGIONS;
23 import android.car.builtin.content.pm.PackageManagerHelper;
25 import android.car.content.pm.CarPackageManager;
27 import android.content.pm.ActivityInfo;
28 import android.content.pm.PackageInfo;
29 import android.content.pm.PackageManager;
30 import android.content.pm.PackageManager.NameNotFoundException;
65 final PackageManager pm = context.getPackageManager(); in getAllActivitiesForPackageAsUser() local
67 PackageManagerHelper.getPackageInfoAsUser(pm, packageName, in getAllActivitiesForPackageAsUser()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/pm/
DCarPackageManagerServiceUnitTest.java17 package com.android.car.pm;
20 import static android.car.content.pm.CarPackageManager.ERROR_CODE_NO_PACKAGE;
21 import static android.car.content.pm.CarPackageManager.MANIFEST_METADATA_TARGET_CAR_VERSION;
22 import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
44 import android.content.pm.ApplicationInfo;
45 import android.content.pm.PackageManager;
46 import android.content.pm.PackageManager.NameNotFoundException;
308 int result = android.content.pm.PackageManager.PERMISSION_DENIED; in mockQueryPermission()
310 result = android.content.pm.PackageManager.PERMISSION_GRANTED; in mockQueryPermission()
324 PackageManager pm = mock(PackageManager.class); in mockGetApplicationInfoThrowsNotFound() local
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DAccountTypePreferenceLoader.java25 import android.content.pm.ActivityInfo;
26 import android.content.pm.ApplicationInfo;
27 import android.content.pm.PackageManager;
28 import android.content.pm.PackageManager.NameNotFoundException;
29 import android.content.pm.ResolveInfo;
119 final PackageManager pm = mFragment.getActivity().getPackageManager(); in updatePreferenceIntents() local
148 ResolveInfo ri = pm.resolveActivityAsUser(intent, in updatePreferenceIntents()
167 if (isSafeIntent(pm, prefIntent, acccountType)) { in updatePreferenceIntents()
193 private boolean isSafeIntent(PackageManager pm, Intent intent, String acccountType) { in isSafeIntent() argument
196 ResolveInfo resolveInfo = pm.resolveActivityAsUser(intent, 0, mUserHandle.getIdentifier()); in isSafeIntent()
[all …]
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/util/
DLibUtils.java22 import android.content.pm.ApplicationInfo;
23 import android.content.pm.PackageInfo;
24 import android.content.pm.PackageManager;
25 import android.content.pm.ResolveInfo;
26 import android.content.pm.Signature;
218 public static boolean isSystemPackage(Resources resources, PackageManager pm, PackageInfo pkg) { in isSystemPackage() argument
220 sSystemSignature = new Signature[]{getSystemSignature(pm)}; in isSystemPackage()
223 sPermissionControllerPackageName = pm.getPermissionControllerPackageName(); in isSystemPackage()
226 sServicesSystemSharedLibPackageName = pm.getServicesSystemSharedLibraryPackageName(); in isSystemPackage()
229 sSharedSystemSharedLibPackageName = pm.getSharedSystemSharedLibraryPackageName(); in isSystemPackage()
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
DTestPackageManager.java20 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/Nfc/src/com/android/nfc/
DRegisteredComponentCache.java24 import android.content.pm.ActivityInfo;
25 import android.content.pm.PackageManager;
26 import android.content.pm.PackageManager.NameNotFoundException;
27 import android.content.pm.ResolveInfo;
149 PackageManager pm; in generateComponentsList() local
152 pm = mContext.createPackageContextAsUser("android", 0, in generateComponentsList()
159 List<ResolveInfo> resolveInfos = pm.queryIntentActivitiesAsUser(new Intent(mAction), in generateComponentsList()
163 parseComponentInfo(pm, resolveInfo, components); in generateComponentsList()
180 void parseComponentInfo(PackageManager pm, ResolveInfo info, in parseComponentInfo() argument
186 parser = ai.loadXmlMetaData(pm, mMetaDataName); in parseComponentInfo()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/
DCarrierPreferenceControllerTest.java36 import android.content.pm.PackageManager;
37 import android.content.pm.ResolveInfo;
130 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityFound_openCarrierSettingActivity() local
131 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityFound_openCarrierSettingActivity()
132 doReturn(new ResolveInfo()).when(pm).resolveActivity(any(Intent.class), anyInt()); in handlePreferenceClick_activityFound_openCarrierSettingActivity()
151 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityNotFound_DoNothing() local
152 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityNotFound_DoNothing()
153 doReturn(null).when(pm).resolveActivity(any(Intent.class), anyInt()); in handlePreferenceClick_activityNotFound_DoNothing()
165 PackageManager pm = Mockito.mock(PackageManager.class); in handlePreferenceClick_activityNotConfigured_DoNothing() local
166 doReturn(pm).when(mContext).getPackageManager(); in handlePreferenceClick_activityNotConfigured_DoNothing()
[all …]
/packages/apps/Settings/src/com/android/settings/security/trustagent/
DTrustAgentManager.java25 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()
125 final PackageManager pm = context.getPackageManager(); in getActiveTrustAgents() local
128 final List<ResolveInfo> resolveInfos = pm.queryIntentServices(TRUST_AGENT_INTENT, in getActiveTrustAgents()
137 if (resolveInfo.serviceInfo == null || !shouldProvideTrust(resolveInfo, pm)) { in getActiveTrustAgents()
141 getSettingsComponent(pm, resolveInfo); in getActiveTrustAgents()
168 private TrustAgentComponentInfo getSettingsComponent(PackageManager pm, in getSettingsComponent() argument
179 parser = resolveInfo.serviceInfo.loadXmlMetaData(pm, TRUST_AGENT_META_DATA); in getSettingsComponent()
[all …]
/packages/apps/Settings/src/com/android/settings/utils/
DZenServiceListing.java23 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/shortcut/
DShortcutsUpdateTask.java25 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()

12345678910>>...92