diff options
author | Mason Tang <masontang@google.com> | 2010-08-04 17:20:24 -0700 |
---|---|---|
committer | Mason Tang <masontang@google.com> | 2010-08-13 15:38:46 -0700 |
commit | 2bebde787f9490408ceaf14166de4b016a10daf1 (patch) | |
tree | 23d54927bd3ce6a94615508753305a4db0fe476d /src/com/android/calendar/SearchActivity.java | |
parent | 648c59cfdf0ceaa09c4ea0da3af1566cef703e7c (diff) | |
download | android_packages_apps_Calendar-2bebde787f9490408ceaf14166de4b016a10daf1.tar.gz android_packages_apps_Calendar-2bebde787f9490408ceaf14166de4b016a10daf1.tar.bz2 android_packages_apps_Calendar-2bebde787f9490408ceaf14166de4b016a10daf1.zip |
Converted EventInfo into a fragment
- Also fixed a bug where onResume for search did not work properly
- Refactored EventInfo to use an AsyncQueryService instead of calling managed
queries, parallelized the queries as much as possible to speed up UI
Change-Id: I93554c76e569a11013fcd8c232d9cfb0d20ec46c
Diffstat (limited to 'src/com/android/calendar/SearchActivity.java')
-rw-r--r-- | src/com/android/calendar/SearchActivity.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/calendar/SearchActivity.java b/src/com/android/calendar/SearchActivity.java index 2aefe7ee..b0eddf2b 100644 --- a/src/com/android/calendar/SearchActivity.java +++ b/src/com/android/calendar/SearchActivity.java @@ -54,6 +54,8 @@ public class SearchActivity extends Activity implements Navigator { private Time mTime; + private String mQuery = null; + private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -168,7 +170,9 @@ public class SearchActivity extends Activity implements Navigator { CalendarPreferenceActivity.KEY_HIDE_DECLINED, false); mAgendaListView.setHideDeclinedEvents(hideDeclined); - mAgendaListView.goTo(mTime, true); + if (mQuery == null) { + mAgendaListView.goTo(mTime, true); + } mAgendaListView.onResume(); // Register for Intent broadcasts @@ -202,9 +206,10 @@ public class SearchActivity extends Activity implements Navigator { } private void search(String searchQuery) { + mQuery = searchQuery; mAgendaListView = new AgendaListView(this); setContentView(mAgendaListView); - mAgendaListView.search(searchQuery, true); + mAgendaListView.search(mQuery, true); } |