Merge "DO NOT MERGE Avoids deadlock when applying preferred activities" am: 35dd014a79
am: 92269e5ef8
Change-Id: I6d95f0bbdaa146c4d96f8b8c5f715ef2053074be
This commit is contained in:
@@ -414,6 +414,17 @@ public abstract class PackageManagerInternal {
|
||||
public abstract List<ResolveInfo> queryIntentActivities(Intent intent,
|
||||
@ResolveInfoFlags int flags, int filterCallingUid, int userId);
|
||||
|
||||
/**
|
||||
* Retrieve all activities that can be performed for the given intent.
|
||||
* @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, @Nullable String resolvedType, @ResolveInfoFlags int flags,
|
||||
int filterCallingUid, int userId);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve all services that can be performed for the given intent.
|
||||
* @see PackageManager#queryIntentServices(Intent, int)
|
||||
|
||||
@@ -24560,6 +24560,12 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
public List<ResolveInfo> queryIntentActivities(
|
||||
Intent intent, int flags, int filterCallingUid, int userId) {
|
||||
final String resolvedType = intent.resolveTypeIfNeeded(mContext.getContentResolver());
|
||||
return queryIntentActivities(intent, resolvedType, flags, filterCallingUid, userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResolveInfo> queryIntentActivities(
|
||||
Intent intent, String resolvedType, int flags, int filterCallingUid, int userId) {
|
||||
return PackageManagerService.this
|
||||
.queryIntentActivitiesInternal(intent, resolvedType, flags, filterCallingUid,
|
||||
userId, false /*resolveForStart*/, true /*allowDynamicSplits*/);
|
||||
|
||||
@@ -3341,7 +3341,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user