Build list items first and then notify data set changed
Bug: 35313285
Test: ran the following command 10 times and verified the
crash didn't happen. Before the CL, usually there are 2-3 times
of crash out of 10 attempts.
adb shell monkey -p
com.google.android.contacts --ignore-security-exceptions
--monitor-native-crashes -s 493 -v -v -v 125000
Change-Id: Ic2ab30c55e9c6eb729f163b0ed11174f6f6340d4
diff --git a/src/com/android/contacts/drawer/DrawerAdapter.java b/src/com/android/contacts/drawer/DrawerAdapter.java
index 54cd669..fcb41c6 100644
--- a/src/com/android/contacts/drawer/DrawerAdapter.java
+++ b/src/com/android/contacts/drawer/DrawerAdapter.java
@@ -336,8 +336,8 @@
}
private void notifyChangeAndRebuildList() {
- notifyDataSetChanged();
rebuildItemsList();
+ notifyDataSetChanged();
}
public void setSelectedContactsView(ContactsView contactsView) {