Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e1cabcd0 authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Selecting "Add to my contacts" on tablet can show wrong contact

- The ALL_CONTACTS URI doesn't support sending a contact URI
in the intent as well. Hence, change intent action to
ACTION_VIEW.

- If you view a contact (selectedContactUri contains
that contact), if you modify the group it is in (i.e.
click the "Add to My Contacts" button OR edit contact
and remove them from the group you are currently
filtering your view with), then it's possible
it won't be in the list anymore.

In order to force a reload of the list, we need to have
mSelectionRequired = true, but it is never set to true
if the selected contact URI is the same as before. Thus,
we add a setSelectionRequired() method to force it to
require a selection if this is an incoming request on the
tablet. We don't want to modify the ContactBrowseListFragment
setSelectedContactUri code to set selection required = true
for all cases where the contact URI is equal because that
could lead to extra computation when the list reloads
and the selected contact is still the same.

- Don't compute selected position in adapter two times
(this is a linear search in the cursor). Just reuse the value
that was computed the first time.

Bug: 5478636
Change-Id: Ic5425d084df5492118a0e29cdc48a1c168e558e7
parent a91e74a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment