From 7c1a3efb470d5dcd978f5a1b494687bedc29fa10 Mon Sep 17 00:00:00 2001 From: Christine Chen Date: Fri, 20 Sep 2013 18:04:44 -0700 Subject: Adds starred field to ContactEntry Bug: 10862067 Change-Id: I4d7988e39e68370f0ce7222cd97c1cf8dedc68ef --- src/com/android/contacts/common/list/ContactEntry.java | 1 + src/com/android/contacts/common/list/ContactTileAdapter.java | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/com/android/contacts/common/list/ContactEntry.java b/src/com/android/contacts/common/list/ContactEntry.java index bd673fce..9331aed7 100644 --- a/src/com/android/contacts/common/list/ContactEntry.java +++ b/src/com/android/contacts/common/list/ContactEntry.java @@ -33,6 +33,7 @@ public class ContactEntry { public Drawable presenceIcon; public long id; public int pinned = PinnedPositions.UNPINNED; + public boolean isFavorite = false; public static final ContactEntry BLANK_ENTRY = new ContactEntry(); } \ No newline at end of file diff --git a/src/com/android/contacts/common/list/ContactTileAdapter.java b/src/com/android/contacts/common/list/ContactTileAdapter.java index b3c35fd2..66467a32 100644 --- a/src/com/android/contacts/common/list/ContactTileAdapter.java +++ b/src/com/android/contacts/common/list/ContactTileAdapter.java @@ -258,6 +258,7 @@ public class ContactTileAdapter extends BaseAdapter { contact.photoUri = (photoUri != null ? Uri.parse(photoUri) : null); contact.lookupKey = ContentUris.withAppendedId( Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey), id); + contact.isFavorite = cursor.getInt(mStarredIndex) > 0; // Set phone number and label if (mDisplayType == DisplayType.STREQUENT_PHONE_ONLY) { -- cgit v1.2.3