summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/CallCardFragment.java
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-06-23 12:31:23 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 15:20:00 -0700
commit37621fae82dcad13eec91816174a597ac6bef3a4 (patch)
treefae7cdcb4886a4f1bb8c8d7129053c627190e88f /src/com/android/incallui/CallCardFragment.java
parent3a155baaefd6c75b7dc5fab954329952ce3e5054 (diff)
downloadpackages_apps_InCallUI-37621fae82dcad13eec91816174a597ac6bef3a4.tar.gz
packages_apps_InCallUI-37621fae82dcad13eec91816174a597ac6bef3a4.tar.bz2
packages_apps_InCallUI-37621fae82dcad13eec91816174a597ac6bef3a4.zip
InCallUI: Hide sim label when when calling sub is absent
When make emergency call without sim card, the sim card index 0 will be used. If the state of calling sub is absent, hide the sim label. CRs-Fixed: 683248 Change-Id: Ib912ec0751c0d7942e08e04c34c32df0f2a21bb7
Diffstat (limited to 'src/com/android/incallui/CallCardFragment.java')
-rw-r--r--src/com/android/incallui/CallCardFragment.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java
index c6ae73f1..ce8173a5 100644
--- a/src/com/android/incallui/CallCardFragment.java
+++ b/src/com/android/incallui/CallCardFragment.java
@@ -29,6 +29,7 @@ import android.media.AudioManager;
import android.os.Bundle;
import static android.telephony.TelephonyManager.SIM_STATE_ABSENT;
import android.telephony.MSimTelephonyManager;
+import android.telephony.TelephonyManager;
import android.os.SystemProperties;
import android.provider.Settings;
import android.text.TextUtils;
@@ -334,7 +335,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
final String multiSimName = "perferred_name_sub";
int subscription = getPresenter().getActiveSubscription();
- if ((subscription != -1) && (!isSipCall)){
+ if ((subscription != -1) && (!isSipCall)
+ && MSimTelephonyManager.getDefault().getSimState(subscription)
+ != TelephonyManager.SIM_STATE_ABSENT) {
final String simName = Settings.System.getString(getActivity()
.getContentResolver(), multiSimName + (subscription + 1));
showSubscriptionInfo(simName);