diff options
author | chengzhi.hou <chengzhi.hou@ck-telecom.com> | 2015-08-17 09:10:18 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-08-19 06:14:22 -0700 |
commit | 160f4dc6ef752b7d100de1df73a530109d83269c (patch) | |
tree | a16825cb970d32a083151d75064a8d53da7b21de | |
parent | b836c45fd80afe786cdca02d41b29a839ca3fb0c (diff) | |
download | android_packages_apps_ContactsCommon-160f4dc6ef752b7d100de1df73a530109d83269c.tar.gz android_packages_apps_ContactsCommon-160f4dc6ef752b7d100de1df73a530109d83269c.tar.bz2 android_packages_apps_ContactsCommon-160f4dc6ef752b7d100de1df73a530109d83269c.zip |
Fix:Shouln't display any contacts after clean all letters in dialer search view.
Input some letters in dialer search view, then rotating screen and press
backspace key or search_close_button to clean all letters, the search result
shoul be empty, but actually the list displays all contacts. Just because we
didn't save the value of mShowEmptyListForEmptyQuery.
Change-Id: I2dd56e63d373a378821eef95a09723202a5fb9fc
-rwxr-xr-x | src/com/android/contacts/common/list/ContactEntryListFragment.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/list/ContactEntryListFragment.java b/src/com/android/contacts/common/list/ContactEntryListFragment.java index a345c320..b3d9dc11 100755 --- a/src/com/android/contacts/common/list/ContactEntryListFragment.java +++ b/src/com/android/contacts/common/list/ContactEntryListFragment.java @@ -86,6 +86,7 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter private static final String KEY_DARK_THEME = "darkTheme"; private static final String KEY_LEGACY_COMPATIBILITY = "legacyCompatibility"; private static final String KEY_DIRECTORY_RESULT_LIMIT = "directoryResultLimit"; + private static final String KEY_SHOW_EMPTY_LIST_FOR_EMPTY_QUERY = "showEmptyListForEmptyQuery"; private static final String DIRECTORY_ID_ARG_KEY = "directoryId"; @@ -258,6 +259,7 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter outState.putString(KEY_QUERY_STRING, mQueryString); outState.putInt(KEY_DIRECTORY_RESULT_LIMIT, mDirectoryResultLimit); outState.putBoolean(KEY_DARK_THEME, mDarkTheme); + outState.putBoolean(KEY_SHOW_EMPTY_LIST_FOR_EMPTY_QUERY, mShowEmptyListForEmptyQuery); if (mListView != null) { outState.putParcelable(KEY_LIST_STATE, mListView.onSaveInstanceState()); @@ -293,6 +295,7 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter mQueryString = savedState.getString(KEY_QUERY_STRING); mDirectoryResultLimit = savedState.getInt(KEY_DIRECTORY_RESULT_LIMIT); mDarkTheme = savedState.getBoolean(KEY_DARK_THEME); + mShowEmptyListForEmptyQuery = savedState.getBoolean(KEY_SHOW_EMPTY_LIST_FOR_EMPTY_QUERY); // Retrieve list state. This will be applied in onLoadFinished mListState = savedState.getParcelable(KEY_LIST_STATE); |