diff options
author | wangjing <wangjing@codeaurora.org> | 2015-04-13 17:56:04 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-13 20:21:53 -0700 |
commit | f668e17a0c69bb8aee2e1df4e5224a7ebb27e7b4 (patch) | |
tree | 850514ea61cb20dd6c06c88de791ed17f230a8fd | |
parent | 0c731213aef4b89786fb1032d871f3a4c22ca8d8 (diff) | |
download | android_packages_apps_ContactsCommon-f668e17a0c69bb8aee2e1df4e5224a7ebb27e7b4.tar.gz android_packages_apps_ContactsCommon-f668e17a0c69bb8aee2e1df4e5224a7ebb27e7b4.tar.bz2 android_packages_apps_ContactsCommon-f668e17a0c69bb8aee2e1df4e5224a7ebb27e7b4.zip |
ContactsCommon: Contacts list will redraw when return from details
Dialer's database will update when return from contacts details,
this will cause update SharedPreferences. in this time,
the SharedPreferences monitor will reload contacts data
then the contacts list will redraw.
Add the judgment in the SharedPreferences monitor,
if monitored the dialer's database update, do nothing.
CRs-Fixed: 820758
Change-Id: Ib469595e04acf5c0343cef87f8066b2000386ca4
-rw-r--r-- | src/com/android/contacts/common/preference/ContactsPreferences.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/preference/ContactsPreferences.java b/src/com/android/contacts/common/preference/ContactsPreferences.java index 5c07f83f..4bd6be82 100644 --- a/src/com/android/contacts/common/preference/ContactsPreferences.java +++ b/src/com/android/contacts/common/preference/ContactsPreferences.java @@ -47,6 +47,8 @@ public final class ContactsPreferences implements OnSharedPreferenceChangeListen public static final String DISPLAY_ORDER_KEY = "android.contacts.DISPLAY_ORDER"; + private static final String LAST_UPDATED_MILLIS = "last_updated_millis"; + /** * The value for the SORT_ORDER key corresponding to sort by given name first. */ @@ -194,6 +196,8 @@ public final class ContactsPreferences implements OnSharedPreferenceChangeListen mDisplayOrder = getDisplayOrder(); } else if (SORT_ORDER_KEY.equals(key)) { mSortOrder = getSortOrder(); + } else if (LAST_UPDATED_MILLIS.equals(key)) { + return; } if (mListener != null) mListener.onChange(); } |