diff options
author | Danesh M <daneshm90@gmail.com> | 2013-12-04 16:49:49 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2013-12-04 16:51:15 -0800 |
commit | 17c76fe3179f846c2c701e887350b508f6726ff6 (patch) | |
tree | 74e3f4854162417b20a5f9796e638ef985559b6b | |
parent | 32cce5c6eb0da13e243b2918bd3de7d020523185 (diff) | |
download | android_packages_apps_ContactsCommon-17c76fe3179f846c2c701e887350b508f6726ff6.tar.gz android_packages_apps_ContactsCommon-17c76fe3179f846c2c701e887350b508f6726ff6.tar.bz2 android_packages_apps_ContactsCommon-17c76fe3179f846c2c701e887350b508f6726ff6.zip |
ContactsCommon : Address loader reset bug
If the loader is reset, the adapter partitions need to be cleared,
without it the app tries to access a closed cursor.
Reproduction steps :
Add to contacts
Type a two letters
Enjoy force-close
Change-Id: I76474724bd46512929306ba04a4d156a9b39d9f3
-rw-r--r-- | 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 a8066b81..5f589589 100644 --- a/src/com/android/contacts/common/list/ContactEntryListFragment.java +++ b/src/com/android/contacts/common/list/ContactEntryListFragment.java @@ -408,6 +408,9 @@ public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter } public void onLoaderReset(Loader<Cursor> loader) { + if (mAdapter != null) { + mAdapter.clearPartitions(); + } } protected void onPartitionLoaded(int partitionIndex, Cursor data) { |