summaryrefslogtreecommitdiffstats
path: root/tests/AndroidTests
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-07-06 21:32:50 +0100
committerBjorn Bringert <bringert@android.com>2009-07-08 17:43:49 +0100
commit444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8 (patch)
tree5deb7155bf79ae9001f9d742c905fac2baf7fd9c /tests/AndroidTests
parente9ac96f76d513d2cee50dfea7d70b14669643ba9 (diff)
downloadframeworks_base-444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8.zip
frameworks_base-444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8.tar.gz
frameworks_base-444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8.tar.bz2
Run search UI on its own thread.
Details: - Add a new SearchDialogWrapper class that makes sure all access to the SearchDialog is run one a single thread other than the main ServerThread. - Don't save/restore seach dialog state in Activity. This resulted in lots of calls to the SearchManager throughout the life cycle of all activities, for the questionable benefit of restoring the search dialog in a few cases. - Remove search UI state save/restore, and the isVisible() method from SearchManagerService. They are no longer used, and were tricky to implement since they return values from the search UI thread to the service. - Handle configuration changes in searchDialogWrapper instead of calling through from Activity. Fixes http://b/issue?id=1938101 TODO: - Activity.performPause() calls stopSearch(). This call may not happen until the new activity has been started. If the new activity starts a search immediately, this search could be cancelled by the old activity's call top stopSearch().
Diffstat (limited to 'tests/AndroidTests')
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/SearchManagerTest.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SearchManagerTest.java b/tests/AndroidTests/src/com/android/unit_tests/SearchManagerTest.java
index c4f1ab6..4c5fefc 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/SearchManagerTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/SearchManagerTest.java
@@ -107,8 +107,6 @@ public class SearchManagerTest extends ActivityInstrumentationTestCase2<LocalAct
}
// Checks that the search UI is not visible.
- // This checks both the SearchManager and the SearchManagerService,
- // since SearchManager keeps a local variable for the visibility.
private void assertSearchNotVisible() {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
@@ -245,22 +243,4 @@ public class SearchManagerTest extends ActivityInstrumentationTestCase2<LocalAct
assertSearchNotVisible();
}
- @MediumTest
- public void testSearchDialogState() throws Exception {
- SearchManager searchManager = (SearchManager)
- mContext.getSystemService(Context.SEARCH_SERVICE);
- assertNotNull(searchManager);
-
- Bundle searchState;
-
- // search dialog not visible, so no state should be stored
- searchState = searchManager.saveSearchDialog();
- assertNull(searchState);
-
- searchManager.startSearch("test search string", true, SEARCHABLE_ACTIVITY, null, false);
- searchState = searchManager.saveSearchDialog();
- assertNotNull(searchState);
- searchManager.stopSearch();
- }
-
}