diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/contacts/common/ContactPresenceIconUtil.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/contacts/common/ContactPresenceIconUtil.java')
-rw-r--r-- | java/com/android/contacts/common/ContactPresenceIconUtil.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/android/contacts/common/ContactPresenceIconUtil.java b/java/com/android/contacts/common/ContactPresenceIconUtil.java index eeaf652a8..bce4b21f4 100644 --- a/java/com/android/contacts/common/ContactPresenceIconUtil.java +++ b/java/com/android/contacts/common/ContactPresenceIconUtil.java @@ -19,6 +19,7 @@ package com.android.contacts.common; import android.content.Context; import android.graphics.drawable.Drawable; import android.provider.ContactsContract.StatusUpdates; +import android.support.v4.content.ContextCompat; /** Define the contact present show policy in Contacts */ public class ContactPresenceIconUtil { @@ -36,7 +37,7 @@ public class ContactPresenceIconUtil { case StatusUpdates.AWAY: case StatusUpdates.DO_NOT_DISTURB: case StatusUpdates.INVISIBLE: - return context.getResources().getDrawable(StatusUpdates.getPresenceIconResourceId(status)); + return ContextCompat.getDrawable(context, StatusUpdates.getPresenceIconResourceId(status)); case StatusUpdates.OFFLINE: // The undefined status is treated as OFFLINE in getPresenceIconResourceId(); default: |