From 58f7eaf3d2045f1822ff50c556d834e509aa5bab Mon Sep 17 00:00:00 2001 From: PauloftheWest Date: Thu, 18 Dec 2014 13:59:04 -0800 Subject: [PATCH] SIM Status now shows data connection instead of voice. Bug: 18714691 Change-Id: Ia2e9642d3331126a040ae1a059300df65d9551b9 --- .../android/settings/deviceinfo/SimStatus.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/com/android/settings/deviceinfo/SimStatus.java b/src/com/android/settings/deviceinfo/SimStatus.java index 1300419c89a..81544c6427c 100644 --- a/src/com/android/settings/deviceinfo/SimStatus.java +++ b/src/com/android/settings/deviceinfo/SimStatus.java @@ -236,16 +236,11 @@ public class SimStatus extends PreferenceActivity { private void updateNetworkType() { // Whether EDGE, UMTS, etc... String networktype = null; - final ITelephony telephony = ITelephony.Stub.asInterface( - ServiceManager.getService(Context.TELEPHONY_SERVICE)); - try { - final int actualNetworkType = telephony.getVoiceNetworkTypeForSubscriber( - mSir.getSubscriptionId()); - if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) { - networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType); - } - } catch (RemoteException remoteException){ - // Do nothing, networkType will remain null. + final int subId = mSir.getSubscriptionId(); + final int actualNetworkType = mTelephonyManager.getDataNetworkType( + mSir.getSubscriptionId()); + if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) { + networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType); } setSummaryText(KEY_NETWORK_TYPE, networktype);