List of usage examples for android.telecom PhoneAccount getHighlightColor
public int getHighlightColor()
From source file:Main.java
/** * Extract account color from PhoneAccount object. */// ww w . j a v a 2 s .c om public static int getAccountColor(Context context, PhoneAccountHandle accountHandle) { TelecomManager telecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); final PhoneAccount account = telecomManager.getPhoneAccount(accountHandle); // For single-sim devices the PhoneAccount will be NO_HIGHLIGHT_COLOR by default, so it is // safe to always use the account highlight color. return account == null ? PhoneAccount.NO_HIGHLIGHT_COLOR : account.getHighlightColor(); }