summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Activity.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-08 13:28:29 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-08 13:28:29 -0700
commit91b0a7013e4b6d170087cb4c9a3c35b787f92a6b (patch)
tree714979f975a2130ef1ff613b4fef8c206dfcae86 /core/java/android/app/Activity.java
parentf9c228a51fba54e80826fb6aa5d53f43a2e86042 (diff)
parent444c727e0eecf83e9d0b9c4e7af5cbf5fc4135f8 (diff)
downloadframeworks_base-91b0a7013e4b6d170087cb4c9a3c35b787f92a6b.zip
frameworks_base-91b0a7013e4b6d170087cb4c9a3c35b787f92a6b.tar.gz
frameworks_base-91b0a7013e4b6d170087cb4c9a3c35b787f92a6b.tar.bz2
Merge change 6284 into donut
* changes: Run search UI on its own thread.
Diffstat (limited to 'core/java/android/app/Activity.java')
-rw-r--r--core/java/android/app/Activity.java37
1 files changed, 2 insertions, 35 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index ca9632a..df50f77 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -606,7 +606,6 @@ public class Activity extends ContextThemeWrapper
private static final String SAVED_DIALOG_IDS_KEY = "android:savedDialogIds";
private static final String SAVED_DIALOGS_TAG = "android:savedDialogs";
private static final String SAVED_DIALOG_KEY_PREFIX = "android:dialog_";
- private static final String SAVED_SEARCH_DIALOG_KEY = "android:search_dialog";
private SparseArray<Dialog> mManagedDialogs;
@@ -630,7 +629,6 @@ public class Activity extends ContextThemeWrapper
/*package*/ int mConfigChangeFlags;
/*package*/ Configuration mCurrentConfig;
private SearchManager mSearchManager;
- private Bundle mSearchDialogState = null;
private Window mWindow;
@@ -808,13 +806,6 @@ public class Activity extends ContextThemeWrapper
final void performRestoreInstanceState(Bundle savedInstanceState) {
onRestoreInstanceState(savedInstanceState);
restoreManagedDialogs(savedInstanceState);
-
- // Also restore the state of a search dialog (if any)
- // TODO more generic than just this manager
- Bundle searchState = savedInstanceState.getBundle(SAVED_SEARCH_DIALOG_KEY);
- if (searchState != null) {
- mSearchManager.restoreSearchDialog(searchState);
- }
}
/**
@@ -1030,14 +1021,6 @@ public class Activity extends ContextThemeWrapper
final void performSaveInstanceState(Bundle outState) {
onSaveInstanceState(outState);
saveManagedDialogs(outState);
-
- // Also save the state of a search dialog (if any)
- // TODO more generic than just this manager
- // onPause() should always be called before this method, so mSearchManagerState
- // should be up to date.
- if (mSearchDialogState != null) {
- outState.putBundle(SAVED_SEARCH_DIALOG_KEY, mSearchDialogState);
- }
}
/**
@@ -1317,10 +1300,6 @@ public class Activity extends ContextThemeWrapper
c.mCursor.close();
}
}
-
- // Clear any search state saved in performPause(). If the state may be needed in the
- // future, it will have been saved by performSaveInstanceState()
- mSearchDialogState = null;
}
/**
@@ -1341,11 +1320,7 @@ public class Activity extends ContextThemeWrapper
*/
public void onConfigurationChanged(Configuration newConfig) {
mCalled = true;
-
- // also update search dialog if showing
- // TODO more generic than just this manager
- mSearchManager.onConfigurationChanged(newConfig);
-
+
if (mWindow != null) {
// Pass the configuration changed event to the window
mWindow.onConfigurationChanged(newConfig);
@@ -3575,20 +3550,12 @@ public class Activity extends ContextThemeWrapper
"Activity " + mComponent.toShortString() +
" did not call through to super.onPostResume()");
}
-
- // restore search dialog, if any
- if (mSearchDialogState != null) {
- mSearchManager.restoreSearchDialog(mSearchDialogState);
- }
- mSearchDialogState = null;
}
final void performPause() {
onPause();
- // save search dialog state if the search dialog is open,
- // and then dismiss the search dialog
- mSearchDialogState = mSearchManager.saveSearchDialog();
+ // dismiss the search dialog if it is open
mSearchManager.stopSearch();
}