Fix "the note of contact can't be deleted successfully"
Reproduce step:
1.login Google account
2.launch the "Contacts" app
3.Edit a new contact and click the button "ADD ANOTHER FIFLED">select "Notes" item>Edit notes to this contact
4.Check this contact info include notes
5.Click "Edit" icon and clear the edited notes info
6.click top-left icon "√"
7.Check the contact info and found the note still exist.
Analysis:
When the only entry deleted, the mAboutCard fails to refresh its entries as
the size is 0. So shouldShow() will return true based on the old data.
Change-Id: I852443f60c7ce7df10d045b1d5f7baabccb35606
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index e5574d9..85b4d00 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1049,14 +1049,12 @@
mAboutCard.setTitle(customAboutCardName);
}
- if (aboutCardEntries.size() > 0) {
- mAboutCard.initialize(aboutCardEntries,
- /* numInitialVisibleEntries = */ 1,
- /* isExpanded = */ true,
- /* isAlwaysExpanded = */ true,
- mExpandingEntryCardViewListener,
- mScroller);
- }
+ mAboutCard.initialize(aboutCardEntries,
+ /* numInitialVisibleEntries = */ 1,
+ /* isExpanded = */ true,
+ /* isAlwaysExpanded = */ true,
+ mExpandingEntryCardViewListener,
+ mScroller);
if (contactCardEntries.size() == 0 && aboutCardEntries.size() == 0) {
initializeNoContactDetailCard();