Loading services/core/java/android/content/pm/PackageManagerInternal.java +7 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager.ApplicationInfoFlags; Loading Loading @@ -244,12 +245,16 @@ public abstract class PackageManagerInternal { /** * Retrieve all activities that can be performed for the given intent. * @param resolvedType the resolved type of the intent, which should be resolved via * {@link Intent#resolveTypeIfNeeded(ContentResolver)} before passing to {@link PackageManager} * @param filterCallingUid The results will be filtered in the context of this UID instead * of the calling UID. * @see PackageManager#queryIntentActivities(Intent, int) */ public abstract List<ResolveInfo> queryIntentActivities(Intent intent, @ResolveInfoFlags int flags, int filterCallingUid, int userId); public abstract List<ResolveInfo> queryIntentActivities( Intent intent, @Nullable String resolvedType, @ResolveInfoFlags int flags, int filterCallingUid, int userId); /** * Retrieve all services that can be performed for the given intent. Loading services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,7 @@ public class CrossProfileAppsServiceImpl extends ICrossProfileApps.Stub { final List<ResolveInfo> apps = mInjector.getPackageManagerInternal().queryIntentActivities( launchIntent, launchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, callingUid, userId); Loading services/core/java/com/android/server/pm/LauncherAppsService.java +4 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ public class LauncherAppsService extends SystemService { final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ResolveInfo> apps = pmInt.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading Loading @@ -468,6 +469,7 @@ public class LauncherAppsService extends SystemService { matchIntent.addCategory(Intent.CATEGORY_LAUNCHER); matchIntent.setPackage(packageName); final List<ResolveInfo> infoList = pmInt.queryIntentActivities(matchIntent, matchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DISABLED_COMPONENTS, Binder.getCallingUid(), getCallingUserId()); final int size = infoList.size(); Loading Loading @@ -539,6 +541,7 @@ public class LauncherAppsService extends SystemService { final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ResolveInfo> apps = pmInt.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading Loading @@ -842,6 +845,7 @@ public class LauncherAppsService extends SystemService { // as calling startActivityAsUser ignores the category and just // resolves based on the component if present. List<ResolveInfo> apps = pmInt.queryIntentActivities(launchIntent, launchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading services/core/java/com/android/server/pm/PackageManagerService.java +1 −2 Original line number Diff line number Diff line Loading @@ -23097,8 +23097,7 @@ public class PackageManagerService extends IPackageManager.Stub @Override public List<ResolveInfo> queryIntentActivities( Intent intent, int flags, int filterCallingUid, int userId) { final String resolvedType = intent.resolveTypeIfNeeded(mContext.getContentResolver()); Intent intent, String resolvedType, int flags, int filterCallingUid, int userId) { return PackageManagerService.this .queryIntentActivitiesInternal(intent, resolvedType, flags, filterCallingUid, userId, false /*resolveForStart*/, true /*allowDynamicSplits*/); services/core/java/com/android/server/pm/Settings.java +2 −1 Original line number Diff line number Diff line Loading @@ -3348,7 +3348,8 @@ public final class Settings { int flags, ComponentName cn, String scheme, PatternMatcher ssp, IntentFilter.AuthorityEntry auth, PatternMatcher path, int userId) { final List<ResolveInfo> ri = pmInternal.queryIntentActivities(intent, flags, Binder.getCallingUid(), 0); pmInternal.queryIntentActivities( intent, intent.getType(), flags, Binder.getCallingUid(), 0); if (PackageManagerService.DEBUG_PREFERRED) { Log.d(TAG, "Queried " + intent + " results: " + ri); } Loading Loading
services/core/java/android/content/pm/PackageManagerInternal.java +7 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager.ApplicationInfoFlags; Loading Loading @@ -244,12 +245,16 @@ public abstract class PackageManagerInternal { /** * Retrieve all activities that can be performed for the given intent. * @param resolvedType the resolved type of the intent, which should be resolved via * {@link Intent#resolveTypeIfNeeded(ContentResolver)} before passing to {@link PackageManager} * @param filterCallingUid The results will be filtered in the context of this UID instead * of the calling UID. * @see PackageManager#queryIntentActivities(Intent, int) */ public abstract List<ResolveInfo> queryIntentActivities(Intent intent, @ResolveInfoFlags int flags, int filterCallingUid, int userId); public abstract List<ResolveInfo> queryIntentActivities( Intent intent, @Nullable String resolvedType, @ResolveInfoFlags int flags, int filterCallingUid, int userId); /** * Retrieve all services that can be performed for the given intent. Loading
services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,7 @@ public class CrossProfileAppsServiceImpl extends ICrossProfileApps.Stub { final List<ResolveInfo> apps = mInjector.getPackageManagerInternal().queryIntentActivities( launchIntent, launchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, callingUid, userId); Loading
services/core/java/com/android/server/pm/LauncherAppsService.java +4 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ public class LauncherAppsService extends SystemService { final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ResolveInfo> apps = pmInt.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading Loading @@ -468,6 +469,7 @@ public class LauncherAppsService extends SystemService { matchIntent.addCategory(Intent.CATEGORY_LAUNCHER); matchIntent.setPackage(packageName); final List<ResolveInfo> infoList = pmInt.queryIntentActivities(matchIntent, matchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DISABLED_COMPONENTS, Binder.getCallingUid(), getCallingUserId()); final int size = infoList.size(); Loading Loading @@ -539,6 +541,7 @@ public class LauncherAppsService extends SystemService { final PackageManagerInternal pmInt = LocalServices.getService(PackageManagerInternal.class); List<ResolveInfo> apps = pmInt.queryIntentActivities(intent, intent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading Loading @@ -842,6 +845,7 @@ public class LauncherAppsService extends SystemService { // as calling startActivityAsUser ignores the category and just // resolves based on the component if present. List<ResolveInfo> apps = pmInt.queryIntentActivities(launchIntent, launchIntent.resolveTypeIfNeeded(mContext.getContentResolver()), PackageManager.MATCH_DIRECT_BOOT_AWARE | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, callingUid, user.getIdentifier()); Loading
services/core/java/com/android/server/pm/PackageManagerService.java +1 −2 Original line number Diff line number Diff line Loading @@ -23097,8 +23097,7 @@ public class PackageManagerService extends IPackageManager.Stub @Override public List<ResolveInfo> queryIntentActivities( Intent intent, int flags, int filterCallingUid, int userId) { final String resolvedType = intent.resolveTypeIfNeeded(mContext.getContentResolver()); Intent intent, String resolvedType, int flags, int filterCallingUid, int userId) { return PackageManagerService.this .queryIntentActivitiesInternal(intent, resolvedType, flags, filterCallingUid, userId, false /*resolveForStart*/, true /*allowDynamicSplits*/);
services/core/java/com/android/server/pm/Settings.java +2 −1 Original line number Diff line number Diff line Loading @@ -3348,7 +3348,8 @@ public final class Settings { int flags, ComponentName cn, String scheme, PatternMatcher ssp, IntentFilter.AuthorityEntry auth, PatternMatcher path, int userId) { final List<ResolveInfo> ri = pmInternal.queryIntentActivities(intent, flags, Binder.getCallingUid(), 0); pmInternal.queryIntentActivities( intent, intent.getType(), flags, Binder.getCallingUid(), 0); if (PackageManagerService.DEBUG_PREFERRED) { Log.d(TAG, "Queried " + intent + " results: " + ri); } Loading