Stop switching to main contacts list unnecessarily.
Test
Manual: follow repro steps from each bug and verify expected behavior occurs
Bug 31838582
Bug 31829161
Bug 32068858
Bug 32379067
Bug 32377019
Bug 32339019
Change-Id: Ie2760ed144854f8c6e57b6b7ba7353864180c2e7
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index afc66e6..0ee9965 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -908,8 +908,11 @@
}
private void handleFilterChangeForActivity(ContactListFilter filter) {
- // Set mShouldSwitchToAllContacts to true, so that we can switch to all contacts later.
- if (filter.isContactsFilterType()) {
+ // The filter was changed while this activity was in the background. If we're in the
+ // assistant view Switch to the main contacts list when we resume to prevent
+ // b/31838582 and b/31829161
+ // TODO: this is a hack; we need to do some cleanup of the contact list filter stuff
+ if (isAssistantView() && filter.isContactsFilterType()) {
mShouldSwitchToAllContacts = true;
}