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

Commit 246978b8 authored by Tom Taylor's avatar Tom Taylor
Browse files

Add a method to clear info about a contact

Add a method so the ContactInfoWidget will throw away the cached
info it has on a contact (e.g. picture and uri).

Change-Id: Ia8f376e356c6bcf246bbd72239c5ca2a3b7c9574
parent dd28d563
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -408,6 +408,17 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
                PHONE_LOOKUP_PROJECTION, null, null, null);
    }

    /**
     * Method to force this widget to forget everything it knows about the contact.
     * The widget isn't automatically updated or redrawn.
     *
     */
    public void wipeClean() {
        setPhoto(null);
        mContactUri = null;
        mExcludeMimes = null;
    }

    private void startContactQuery(Uri contactUri) {
        mQueryHandler.startQuery(TOKEN_CONTACT_INFO, null, contactUri, ContactQuery.COLUMNS,
                null, null, null);