Loading core/java/android/content/pm/PackageManager.java +0 −7 Original line number Diff line number Diff line Loading @@ -200,12 +200,6 @@ public abstract class PackageManager { */ public static final int MATCH_DEFAULT_ONLY = 0x00010000; /** * Resolution and querying flag: do not resolve intents cross-profile. * @hide */ public static final int NO_CROSS_PROFILE = 0x00020000; /** * Flag for {@link addCrossProfileIntentFilter}: if this flag is set: * when resolving an intent that matches the {@link CrossProfileIntentFilter}, the current Loading Loading @@ -2440,7 +2434,6 @@ public abstract class PackageManager { * @see #MATCH_DEFAULT_ONLY * @see #GET_INTENT_FILTERS * @see #GET_RESOLVED_FILTER * @see #NO_CROSS_PROFILE * @hide */ public abstract List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, Loading services/core/java/com/android/server/pm/LauncherAppsService.java +2 −4 Original line number Diff line number Diff line Loading @@ -199,8 +199,7 @@ public class LauncherAppsService extends SystemService { mainIntent.setPackage(packageName); long ident = Binder.clearCallingIdentity(); try { List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent, PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent, 0 /* flags */, user.getIdentifier()); return apps; } finally { Loading Loading @@ -288,8 +287,7 @@ public class LauncherAppsService extends SystemService { // as calling startActivityAsUser ignores the category and just // resolves based on the component if present. List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(launchIntent, PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user user.getIdentifier()); 0 /* flags */, user.getIdentifier()); final int size = apps.size(); for (int i = 0; i < size; ++i) { ActivityInfo activityInfo = apps.get(i).activityInfo; Loading services/core/java/com/android/server/pm/PackageManagerService.java +28 −31 Original line number Diff line number Diff line Loading @@ -3240,10 +3240,9 @@ public class PackageManagerService extends IPackageManager.Stub { // reader synchronized (mPackages) { final String pkgName = intent.getPackage(); boolean queryCrossProfile = (flags & PackageManager.NO_CROSS_PROFILE) == 0; if (pkgName == null) { ResolveInfo resolveInfo = null; if (queryCrossProfile) { // Check if the intent needs to be forwarded to another user for this package ArrayList<ResolveInfo> crossProfileResult = queryIntentActivitiesCrossProfilePackage( Loading @@ -3265,7 +3264,7 @@ public class PackageManagerService extends IPackageManager.Stub { // Check for cross profile results. resolveInfo = queryCrossProfileIntents( matchingFilters, intent, resolvedType, flags, userId); } // Check for results in the current profile. List<ResolveInfo> result = mActivities.queryIntent( intent, resolvedType, flags, userId); Loading @@ -3277,7 +3276,6 @@ public class PackageManagerService extends IPackageManager.Stub { } final PackageParser.Package pkg = mPackages.get(pkgName); if (pkg != null) { if (queryCrossProfile) { ArrayList<ResolveInfo> crossProfileResult = queryIntentActivitiesCrossProfilePackage( intent, resolvedType, flags, userId, pkg, pkgName); Loading @@ -3285,7 +3283,6 @@ public class PackageManagerService extends IPackageManager.Stub { // Skip the current profile return crossProfileResult; } } return mActivities.queryIntentForPackage(intent, resolvedType, flags, pkg.activities, userId); } Loading Loading
core/java/android/content/pm/PackageManager.java +0 −7 Original line number Diff line number Diff line Loading @@ -200,12 +200,6 @@ public abstract class PackageManager { */ public static final int MATCH_DEFAULT_ONLY = 0x00010000; /** * Resolution and querying flag: do not resolve intents cross-profile. * @hide */ public static final int NO_CROSS_PROFILE = 0x00020000; /** * Flag for {@link addCrossProfileIntentFilter}: if this flag is set: * when resolving an intent that matches the {@link CrossProfileIntentFilter}, the current Loading Loading @@ -2440,7 +2434,6 @@ public abstract class PackageManager { * @see #MATCH_DEFAULT_ONLY * @see #GET_INTENT_FILTERS * @see #GET_RESOLVED_FILTER * @see #NO_CROSS_PROFILE * @hide */ public abstract List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, Loading
services/core/java/com/android/server/pm/LauncherAppsService.java +2 −4 Original line number Diff line number Diff line Loading @@ -199,8 +199,7 @@ public class LauncherAppsService extends SystemService { mainIntent.setPackage(packageName); long ident = Binder.clearCallingIdentity(); try { List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent, PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent, 0 /* flags */, user.getIdentifier()); return apps; } finally { Loading Loading @@ -288,8 +287,7 @@ public class LauncherAppsService extends SystemService { // as calling startActivityAsUser ignores the category and just // resolves based on the component if present. List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(launchIntent, PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user user.getIdentifier()); 0 /* flags */, user.getIdentifier()); final int size = apps.size(); for (int i = 0; i < size; ++i) { ActivityInfo activityInfo = apps.get(i).activityInfo; Loading
services/core/java/com/android/server/pm/PackageManagerService.java +28 −31 Original line number Diff line number Diff line Loading @@ -3240,10 +3240,9 @@ public class PackageManagerService extends IPackageManager.Stub { // reader synchronized (mPackages) { final String pkgName = intent.getPackage(); boolean queryCrossProfile = (flags & PackageManager.NO_CROSS_PROFILE) == 0; if (pkgName == null) { ResolveInfo resolveInfo = null; if (queryCrossProfile) { // Check if the intent needs to be forwarded to another user for this package ArrayList<ResolveInfo> crossProfileResult = queryIntentActivitiesCrossProfilePackage( Loading @@ -3265,7 +3264,7 @@ public class PackageManagerService extends IPackageManager.Stub { // Check for cross profile results. resolveInfo = queryCrossProfileIntents( matchingFilters, intent, resolvedType, flags, userId); } // Check for results in the current profile. List<ResolveInfo> result = mActivities.queryIntent( intent, resolvedType, flags, userId); Loading @@ -3277,7 +3276,6 @@ public class PackageManagerService extends IPackageManager.Stub { } final PackageParser.Package pkg = mPackages.get(pkgName); if (pkg != null) { if (queryCrossProfile) { ArrayList<ResolveInfo> crossProfileResult = queryIntentActivitiesCrossProfilePackage( intent, resolvedType, flags, userId, pkg, pkgName); Loading @@ -3285,7 +3283,6 @@ public class PackageManagerService extends IPackageManager.Stub { // Skip the current profile return crossProfileResult; } } return mActivities.queryIntentForPackage(intent, resolvedType, flags, pkg.activities, userId); } Loading