From 444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8 Mon Sep 17 00:00:00 2001 From: Bjorn Bringert Date: Mon, 6 Jul 2009 21:32:50 +0100 Subject: 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(). --- .../com/android/unit_tests/SearchManagerTest.java | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'tests') 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