diff options
author | Satish Sampath <satish@android.com> | 2009-06-04 11:51:17 +0100 |
---|---|---|
committer | Satish Sampath <satish@android.com> | 2009-06-05 10:34:53 +0100 |
commit | f9acde27486bcc6eea1092073f7b47c31749efd6 (patch) | |
tree | f82fb2fb4417e0774c8bfc56e21344877238dce7 /tests/AndroidTests | |
parent | 7ebda6f110708bdb704f8700a6b3473249b12baf (diff) | |
download | frameworks_base-f9acde27486bcc6eea1092073f7b47c31749efd6.zip frameworks_base-f9acde27486bcc6eea1092073f7b47c31749efd6.tar.gz frameworks_base-f9acde27486bcc6eea1092073f7b47c31749efd6.tar.bz2 |
Include web search providers in Searchables.
- Along with ACTION_SEARCH we now enumate ACTION_WEB_SEARCH as well so web search providers are covered in the searchables list. This fixes a broken unit test.
- Moved get/setPreferredWebSearchActivity and get-all-web-search-providers implementation to this module when the searchables list gets updated, so that it happens on boot and on package add/remove events and remains up to date. The duplicate code in WebSearchProvider will be removed in a separate change.
- Also made Searchables broadcast an intent when the searchables list got rebuilt, so components such as GlobalSearch/SuggestionSources no longer need to do this on their own.
Diffstat (limited to 'tests/AndroidTests')
-rw-r--r-- | tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java b/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java index bdf67ba..a46f07d 100644 --- a/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java +++ b/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java @@ -361,7 +361,8 @@ public class SearchablesTest extends AndroidTestCase { @Override public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) { assertNotNull(intent); - assertEquals(intent.getAction(), Intent.ACTION_SEARCH); + assertTrue(intent.getAction().equals(Intent.ACTION_SEARCH) + || intent.getAction().equals(Intent.ACTION_WEB_SEARCH)); switch (mSearchablesMode) { case SEARCHABLES_PASSTHROUGH: return mRealPackageManager.queryIntentActivities(intent, flags); |