Use the older way to cope with onInvalidSelection()
Although we're showing "all contacts" list when the selected contact isn't in the current filtered list, we don't explicitly select the contact, thus detail page ends up to showing previously selected contact. We can partly achieve it, by selecting the contact uri programatically after showing "all contacts" list, but then, the next problem would be, what should be done when even the "all contacts" list does not have the requested contact. The case is super rare (since "all contacts" should include almost all contacts users usually want) but still possible, and there's no easy way to determine the edge case. One possible workaround for this rare case is to try to show "all contacts" once and fall-back to single contact mode if the requested contact isn't there. Though it sounds feasible, the change would become a bit too risky at this point. For example, it may be very slow with larger database. Let's just show single contact for now, and show correct directory header. See also Ica75178d10b4a9b95c44cc4f75f56b65fbc67da8 for the code introducing single contact mode. TESTED (on phone): - This change should not affect People UI for Phone. TESTED (on tablet): - set custom filter with no contacts, and create a contact. We should show the contact both in the list and detail. - set custom filter with no contacts, launch quick contact via favorite screen, and open contact detail via the quick contact. We should show the contact both in the list and detail. - set custom filter with no contacts, launch the other app which relies on quick contact, and open contact detail the quick contact. We should show the contact both in the list and detail. Bug: 5193999 Change-Id: I233162572e25acb737c9eae787dfc146879a0dc2
Loading
Please register or sign in to comment