summaryrefslogtreecommitdiffstats
path: root/src/com/android/dialer/calllog/PhoneAccountUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/dialer/calllog/PhoneAccountUtils.java')
-rw-r--r--src/com/android/dialer/calllog/PhoneAccountUtils.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/dialer/calllog/PhoneAccountUtils.java b/src/com/android/dialer/calllog/PhoneAccountUtils.java
index 11c1b178e..3493ce1d6 100644
--- a/src/com/android/dialer/calllog/PhoneAccountUtils.java
+++ b/src/com/android/dialer/calllog/PhoneAccountUtils.java
@@ -63,6 +63,14 @@ public class PhoneAccountUtils {
}
/**
+ * Extract account color from PhoneAccount object.
+ */
+ public static int getAccountColor(Context context, PhoneAccountHandle accountHandle) {
+ PhoneAccount account = getAccountOrNull(context, accountHandle);
+ return account == null ? PhoneAccount.NO_HIGHLIGHT_COLOR : account.getHighlightColor();
+ }
+
+ /**
* Retrieve the account metadata, but if the account does not exist or the device has only a
* single registered and enabled account, return null.
*/