diff options
author | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2016-05-17 17:09:38 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-17 17:46:12 -0700 |
commit | 5f1bd903b1692898091f9d93330ee36a091b1655 (patch) | |
tree | 0822abbbfa0a5eda71b333555485fd21d6f54a68 /src-ambient/com | |
parent | 4e40c7c27eca412a0aff82b0c7f699001ea63b75 (diff) | |
download | android_packages_apps_PhoneCommon-5f1bd903b1692898091f9d93330ee36a091b1655.tar.gz android_packages_apps_PhoneCommon-5f1bd903b1692898091f9d93330ee36a091b1655.tar.bz2 android_packages_apps_PhoneCommon-5f1bd903b1692898091f9d93330ee36a091b1655.zip |
Show SIP call method in spinner and force update on resume
Change-Id: Icd22b9d20fc3a1e36aa5349830e775b696a46328
issue-id: CYNGNOS-2655
Diffstat (limited to 'src-ambient/com')
-rw-r--r-- | src-ambient/com/android/phone/common/incall/utils/CallMethodUtils.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src-ambient/com/android/phone/common/incall/utils/CallMethodUtils.java b/src-ambient/com/android/phone/common/incall/utils/CallMethodUtils.java index e593cf8..dc61adf 100644 --- a/src-ambient/com/android/phone/common/incall/utils/CallMethodUtils.java +++ b/src-ambient/com/android/phone/common/incall/utils/CallMethodUtils.java @@ -17,6 +17,7 @@ package com.android.phone.common.incall.utils; import android.content.Context; +import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; @@ -128,10 +129,16 @@ public class CallMethodUtils { getPhoneAccountColor(subMgr.getActiveSubscriptionInfo(callMethodInfo.mSubId)); callMethodInfo.mIsInCallProvider = false; - final int simState = telephonyMgr.getSimState(callMethodInfo.mSlotId); - if ((simState == TelephonyManager.SIM_STATE_ABSENT) || - (simState == TelephonyManager.SIM_STATE_UNKNOWN)) { - return null; + // SIP accounts do not have SIM status and should be handled differently. + Uri address = phoneAccount.getAddress(); + if (address != null && PhoneAccount.SCHEME_SIP.equals(address.getScheme())) { + callMethodInfo.mBrandIcon = context.getDrawable(R.drawable.ic_dialer_sip_black_24dp); + } else { + final int simState = telephonyMgr.getSimState(callMethodInfo.mSlotId); + if ((simState == TelephonyManager.SIM_STATE_ABSENT) || + (simState == TelephonyManager.SIM_STATE_UNKNOWN)) { + return null; + } } return callMethodInfo; |