From 240523d3e1b4502326c8d0d313dd1787aa8ff024 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Thu, 17 Dec 2015 09:14:15 +0000 Subject: Show work badge icon/description in InCallUI/Dialer Add work badge icon in calllog for work contacts To see this feature 1. Receive/Make a call from work contact (a contact in work profile has the phone number) 2. Drop/miss the call. See a badge icon next to phone label in calllog BUG=26082618 Change-Id: I7371795e3c3ef925739096f39a70f03722dd430b --- src/com/android/dialer/calllog/ContactInfoHelper.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/com/android/dialer/calllog/ContactInfoHelper.java') diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java index 1fd2fad5e..e075b9bf3 100644 --- a/src/com/android/dialer/calllog/ContactInfoHelper.java +++ b/src/com/android/dialer/calllog/ContactInfoHelper.java @@ -32,6 +32,7 @@ import android.text.TextUtils; import android.util.Log; import com.android.contacts.common.ContactsUtils; +import com.android.contacts.common.compat.ContactsCompat; import com.android.contacts.common.util.Constants; import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.common.util.PhoneNumberHelper; @@ -41,6 +42,7 @@ import com.android.dialer.service.CachedNumberLookupService; import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo; import com.android.dialer.util.TelecomUtil; import com.android.dialerbind.ObjectFactory; +import com.android.incallui.CallerInfo; import org.json.JSONException; import org.json.JSONObject; @@ -200,6 +202,9 @@ public class ContactInfoHelper { info.photoId = phoneLookupCursor.getLong(PhoneQuery.PHOTO_ID); info.photoUri = UriUtils.parseUriOrNull(phoneLookupCursor.getString(PhoneQuery.PHOTO_URI)); info.formattedNumber = null; + info.userType = ContactsUtils.determineUserType(null, + phoneLookupCursor.getLong(PhoneQuery.PERSON_ID)); + return info; } -- cgit v1.2.3