am 70c4a7b1: am 531127a5: Merge "SIM Status now shows data connection instead of voice." into lmp-mr1-dev

* commit '70c4a7b145c4949761e0f13642c535d1bf3c810e':
  SIM Status now shows data connection instead of voice.
This commit is contained in:
Prem Kumar
2014-12-29 17:24:52 +00:00
committed by Android Git Automerger

View File

@@ -236,17 +236,12 @@ 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(
final int subId = mSir.getSubscriptionId();
final int actualNetworkType = mTelephonyManager.getDataNetworkType(
mSir.getSubscriptionId());
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) {
networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType);
}
} catch (RemoteException remoteException){
// Do nothing, networkType will remain null.
}
setSummaryText(KEY_NETWORK_TYPE, networktype);
}