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
diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java
index b98794b..d441155 100644
--- a/core/java/com/android/internal/widget/ContactHeaderWidget.java
+++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java
@@ -408,6 +408,17 @@
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);