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

Commit bbb8c99a authored by Yorke Lee's avatar Yorke Lee
Browse files

Fix crash when starring the user's profile

Bug: 10897667
Change-Id: I61b11ff7aea0fa7b1b76bdf7c1780a2189070570
parent adeadcf0
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -819,10 +819,14 @@ public class ContactSaveService extends IntentService {
        try {
            if (c.moveToFirst()) {
                final long id = c.getLong(0);

                // Don't bother undemoting if this contact is the user's profile.
                if (id < Profile.MIN_ID) {
                    values.clear();
                    values.put(String.valueOf(id), PinnedPositions.UNDEMOTE);
                    getContentResolver().update(PinnedPositions.UPDATE_URI, values, null, null);
                }
            }
        } finally {
            c.close();
        }