public abstract class IntentResolver<F extends IntentFilter,R> extends Object
Constructor and Description |
---|
IntentResolver() |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(F f) |
protected boolean |
allowFilterResult(F filter,
List<R> dest)
Control whether the given filter is allowed to go into the result
list.
|
boolean |
dump(PrintWriter out,
String title,
String prefix,
String packageName,
boolean printFilter,
boolean collapseDuplicates) |
protected void |
dumpFilter(PrintWriter out,
String prefix,
F filter) |
protected void |
dumpFilterLabel(PrintWriter out,
String prefix,
Object label,
int count) |
Iterator<F> |
filterIterator()
Returns an iterator allowing filters to be removed.
|
protected void |
filterResults(List<R> results)
Apply filtering to the results.
|
Set<F> |
filterSet()
Returns a read-only set of the filters.
|
protected Object |
filterToLabel(F filter) |
ArrayList<F> |
findFilters(IntentFilter matching) |
protected boolean |
isFilterStopped(F filter,
int userId)
Returns whether the object associated with the given filter is
"stopped", that is whether it should not be included in the result
if the intent requests to excluded stopped objects.
|
protected boolean |
isFilterVerified(F filter)
Returns whether the given filter is "verified" that is whether it has been verified against
its data URIs.
|
protected abstract boolean |
isPackageForFilter(String packageName,
F filter)
Returns whether this filter is owned by this package.
|
protected abstract F[] |
newArray(int size) |
protected R |
newResult(F filter,
int match,
int userId) |
List<R> |
queryIntent(Intent intent,
String resolvedType,
boolean defaultOnly,
int userId) |
List<R> |
queryIntentFromList(Intent intent,
String resolvedType,
boolean defaultOnly,
ArrayList<F[]> listCut,
int userId) |
void |
removeFilter(F f) |
protected void |
sortResults(List<R> results) |
public void addFilter(F f)
public ArrayList<F> findFilters(IntentFilter matching)
public void removeFilter(F f)
public boolean dump(PrintWriter out, String title, String prefix, String packageName, boolean printFilter, boolean collapseDuplicates)
public Iterator<F> filterIterator()
public List<R> queryIntentFromList(Intent intent, String resolvedType, boolean defaultOnly, ArrayList<F[]> listCut, int userId)
public List<R> queryIntent(Intent intent, String resolvedType, boolean defaultOnly, int userId)
protected boolean allowFilterResult(F filter, List<R> dest)
protected boolean isFilterStopped(F filter, int userId)
protected boolean isFilterVerified(F filter)
Intent.ACTION_VIEW
and the Intent category is
Intent.CATEGORY_BROWSABLE
and the Intent data scheme
is "http" or "https".protected abstract boolean isPackageForFilter(String packageName, F filter)
protected abstract F[] newArray(int size)
protected void filterResults(List<R> results)
protected void dumpFilter(PrintWriter out, String prefix, F filter)
protected void dumpFilterLabel(PrintWriter out, String prefix, Object label, int count)