diff options
author | Victor Chang <vichang@google.com> | 2015-12-17 09:14:15 +0000 |
---|---|---|
committer | Victor Chang <vichang@google.com> | 2016-01-13 22:10:00 +0000 |
commit | 240523d3e1b4502326c8d0d313dd1787aa8ff024 (patch) | |
tree | d6478e553604cbd844704d03d80708c0951bd23b /src/com/android/dialer/calllog/ContactInfoHelper.java | |
parent | 90a13e94e3d918da73e83d80ab12c6e5f3f76f7e (diff) |
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
Diffstat (limited to 'src/com/android/dialer/calllog/ContactInfoHelper.java')
-rw-r--r-- | src/com/android/dialer/calllog/ContactInfoHelper.java | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |