Allow intent resolution to be constrained by package name.

This commit is contained in:
Mihai Preda
2009-05-13 10:13:48 +02:00
parent 75986cf9bc
commit eae850cefe
7 changed files with 157 additions and 45 deletions

View File

@@ -163,6 +163,23 @@ public class IntentResolver<F extends IntentFilter, R extends Object> {
return Collections.unmodifiableSet(mFilters);
}
public List<R> queryIntentFromList(Intent intent, String resolvedType,
boolean defaultOnly, ArrayList<ArrayList<F>> listCut) {
ArrayList<R> resultList = new ArrayList<R>();
final boolean debug = localLOGV ||
((intent.getFlags() & Intent.FLAG_DEBUG_LOG_RESOLUTION) != 0);
final String scheme = intent.getScheme();
int N = listCut.size();
for (int i = 0; i < N; ++i) {
buildResolveList(intent, debug, defaultOnly,
resolvedType, scheme, listCut.get(i), resultList);
}
sortResults(resultList);
return resultList;
}
public List<R> queryIntent(ContentResolver resolver, Intent intent,
String resolvedType, boolean defaultOnly) {
String scheme = intent.getScheme();