/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; 67 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/Stk/src/com/android/stk/ |
D | StkAppInstaller.java | 25 import android.content.pm.IPackageManager; 26 import android.content.pm.PackageManager; 43 IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); in installOrUpdate() local 44 if (pm != null) { in installOrUpdate() 51 pm.overrideLabelAndIcon(component, label, icon, userId); in installOrUpdate() 53 pm.restoreLabelAndIcon(component, userId); in installOrUpdate() 59 setAppState(pm, component, userId, true); in installOrUpdate() 67 IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); in uninstall() local 68 if (pm != null) { in uninstall() 71 setAppState(pm, component, context.getUserId(), false); in uninstall() [all …]
|
/packages/services/Car/car-builtin-lib/src/android/car/builtin/content/pm/ |
D | PackageManagerHelper.java | 17 package android.car.builtin.content.pm; 30 import android.content.pm.ApplicationInfo; 31 import android.content.pm.ComponentInfo; 32 import android.content.pm.IPackageManager; 33 import android.content.pm.PackageInfo; 34 import android.content.pm.PackageManager; 104 public static PackageInfo getPackageInfoAsUser(@NonNull PackageManager pm, in getPackageInfoAsUser() argument 107 return pm.getPackageInfoAsUser(packageName, packageInfoFlags, userId); in getPackageInfoAsUser() 112 public static int getPackageUidAsUser(@NonNull PackageManager pm, @NonNull String packageName, in getPackageUidAsUser() argument 114 return pm.getPackageUidAsUser(packageName, userId); in getPackageUidAsUser() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/settingslib/ |
D | DefaultAppInfo.java | 22 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 …]
|
D | DreamBackend.java | 23 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/apps/Launcher3/src/com/android/launcher3/util/ |
D | Partner.java | 19 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/auto/ |
D | AutoAllAppPermissionsFragment.java | 23 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; 121 PackageManager pm = getContext().getPackageManager(); in updateUi() local 137 perm = pm.getPermissionInfo(info.requestedPermissions[i], /* flags= */ 0); in updateUi() 163 getGroup(PermissionMapping.getGroupOfPermission(perm), pm); in updateUi() 171 PreferenceGroup pref = findOrCreate(group, pm, prefs); in updateUi() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/ |
D | AllAppPermissionsFragment.java | 26 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; 135 PackageManager pm = getActivity().getPackageManager(); in updateUi() local 138 final Drawable icon = appInfo.loadIcon(pm); in updateUi() 139 final CharSequence label = appInfo.loadLabel(pm); in updateUi() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/ |
D | AppUtils.java | 24 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/ |
D | SetActivitiesCameraReceiver.java | 23 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/ |
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/DocumentsUI/src/com/android/documentsui/ |
D | PreBootReceiver.java | 29 import android.content.pm.PackageManager; 52 final PackageManager pm = context.getPackageManager(); in onReceive() local 53 if (pm == null) { in onReceive() 65 context.getPackageName()).getValidOverlay(pm); in onReceive() 77 overlayRes = pm.getResourcesForApplication(overlayPkg); in onReceive() 86 setComponentEnabledByConfigResources(pm, packageName, LAUNCHER_TARGET_CLASS, in onReceive() 88 setComponentEnabledByConfigResources(pm, packageName, DOWNLOADS_TARGET_CLASS, in onReceive() 92 private static void setComponentEnabledByConfigResources(PackageManager pm, String packageName, in setComponentEnabledByConfigResources() argument 105 pm.setComponentEnabledSetting(component, enabled in setComponentEnabledByConfigResources()
|
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/util/ |
D | PackageUtils.java | 19 import static android.content.pm.PackageManager.GET_META_DATA; 20 import static android.content.pm.PackageManager.GET_SIGNING_CERTIFICATES; 21 import static android.content.pm.PackageManager.MATCH_STATIC_SHARED_AND_SDK_LIBRARIES; 26 import android.content.pm.ApplicationInfo; 27 import android.content.pm.PackageInfo; 28 import android.content.pm.PackageManager; 29 import android.content.pm.Signature; 30 import android.content.pm.SigningInfo;
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | RegisteredComponentCache.java | 24 import android.content.pm.ActivityInfo; 25 import android.content.pm.PackageManager; 26 import android.content.pm.PackageManager.NameNotFoundException; 27 import android.content.pm.PackageManager.ResolveInfoFlags; 28 import android.content.pm.ResolveInfo; 150 PackageManager pm; in generateComponentsList() local 153 pm = mContext.createPackageContextAsUser("android", 0, in generateComponentsList() 160 List<ResolveInfo> resolveInfos = pm.queryIntentActivitiesAsUser(new Intent(mAction), in generateComponentsList() 165 parseComponentInfo(pm, resolveInfo, components); in generateComponentsList() 182 void parseComponentInfo(PackageManager pm, ResolveInfo info, in parseComponentInfo() argument [all …]
|
/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/services/Car/service/src/com/android/car/pm/ |
D | CarAppMetadataReader.java | 16 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/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 | 25 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/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/services/Car/tests/carservice_unit_test/src/com/android/car/pm/ |
D | CarPackageManagerServiceUnitTest.java | 17 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; 309 int result = android.content.pm.PackageManager.PERMISSION_DENIED; in mockQueryPermission() 311 result = android.content.pm.PackageManager.PERMISSION_GRANTED; in mockQueryPermission() 325 PackageManager pm = mock(PackageManager.class); in mockGetApplicationInfoThrowsNotFound() local [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/util/ |
D | LibUtils.java | 22 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/Settings/tests/unit/src/com/android/settings/network/telephony/ |
D | CarrierPreferenceControllerTest.java | 36 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/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/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/receivers/ |
D | LockedBootCompletedReceiver.java | 19 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; 20 import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED; 21 import static android.content.pm.PackageManager.DONT_KILL_APP; 27 import android.content.pm.PackageManager; 52 final PackageManager pm = context.getPackageManager(); in startLockTaskModeIfApplicable() local 61 pm.setComponentEnabledSetting(lockTaskBootCompletedReceiver, in startLockTaskModeIfApplicable() 67 pm.setComponentEnabledSetting( in startLockTaskModeIfApplicable()
|