diff options
| author | Narayan Kamath <narayan@google.com> | 2011-06-28 12:07:18 +0100 |
|---|---|---|
| committer | Narayan Kamath <narayan@google.com> | 2011-06-28 15:30:49 +0100 |
| commit | ee69ff4eaee9342843d5f25338288865dda2d36a (patch) | |
| tree | f7a35649b1a716ed03a48014b6b12a6f00c06641 /core/java/android/app/SearchManager.java | |
| parent | 7ae28d321684ea71fa41b2dc4caca14c6d964984 (diff) | |
Make the system global search provider a user setting.
Also, modify Searchables / SearchManagerService to
honour the setting when it's set.
Change-Id: Ia63351fff4fe28ee79ac8b9e30fdb8edc43f5534
Diffstat (limited to 'core/java/android/app/SearchManager.java')
| -rw-r--r-- | core/java/android/app/SearchManager.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java index aab087fcf54f..85a2fa831f65 100644 --- a/core/java/android/app/SearchManager.java +++ b/core/java/android/app/SearchManager.java @@ -22,6 +22,7 @@ import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.content.pm.ResolveInfo; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; @@ -374,6 +375,17 @@ public class SearchManager = "android.search.action.SEARCHABLES_CHANGED"; /** + * Intent action to be broadcast to inform that the global search provider + * has changed. Normal components will have no need to handle this intent since + * they should be using API methods from this class to access the global search + * activity + * + * @hide + */ + public final static String INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED + = "android.search.action.GLOBAL_SEARCH_ACTIVITY_CHANGED"; + + /** * Intent action broadcasted to inform that the search settings have changed in some way. * Either searchables have been enabled or disabled, or a different web search provider * has been chosen. @@ -526,6 +538,21 @@ public class SearchManager } /** + * Returns a list of installed apps that handle the global search + * intent. + * + * @hide + */ + public List<ResolveInfo> getGlobalSearchActivities() { + try { + return mService.getGlobalSearchActivities(); + } catch (RemoteException ex) { + Log.e(TAG, "getGlobalSearchActivities() failed: " + ex); + return null; + } + } + + /** * Gets the name of the global search activity. * * @hide |
