public class Searchables extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ENHANCED_GOOGLE_SEARCH_COMPONENT_NAME |
static String |
GOOGLE_SEARCH_COMPONENT_NAME |
Constructor and Description |
---|
Searchables(Context context,
int userId) |
Modifier and Type | Method and Description |
---|---|
ArrayList<ResolveInfo> |
getGlobalSearchActivities()
Returns a list of activities that handle the global search intent.
|
ComponentName |
getGlobalSearchActivity()
Gets the name of the global search activity.
|
SearchableInfo |
getSearchableInfo(ComponentName activity)
Look up, or construct, based on the activity.
|
ArrayList<SearchableInfo> |
getSearchablesInGlobalSearchList()
Returns a list of the searchable activities that can be included in global search.
|
ArrayList<SearchableInfo> |
getSearchablesList()
Returns the list of searchable activities.
|
ComponentName |
getWebSearchActivity()
Gets the name of the web search activity.
|
void |
updateSearchableList()
Builds an entire list (suitable for display) of
activities that are searchable, by iterating the entire set of
ACTION_SEARCH & ACTION_WEB_SEARCH intents.
|
public static String GOOGLE_SEARCH_COMPONENT_NAME
public static String ENHANCED_GOOGLE_SEARCH_COMPONENT_NAME
public Searchables(Context context, int userId)
context
- Context to use for looking up activities etc.public SearchableInfo getSearchableInfo(ComponentName activity)
activity
- The name of the current activity, or null if the
activity does not define any explicit searchable metadata.public void updateSearchableList()
public ArrayList<SearchableInfo> getSearchablesList()
public ArrayList<SearchableInfo> getSearchablesInGlobalSearchList()
public ArrayList<ResolveInfo> getGlobalSearchActivities()
public ComponentName getGlobalSearchActivity()
public ComponentName getWebSearchActivity()