am 058b0561: Merge "Display Voice nw type if Data nw is Unknown for Sprout." into lmp-mr1-dev automerge: 270af42

* commit '058b0561b3712f19aba28020dad3cd63762050f5':
  Display Voice nw type if Data nw is Unknown for Sprout.
This commit is contained in:
Sanket Padawe
2015-01-09 19:17:18 +00:00
committed by Android Git Automerger

View File

@@ -237,10 +237,14 @@ public class SimStatus extends PreferenceActivity {
// Whether EDGE, UMTS, etc... // Whether EDGE, UMTS, etc...
String networktype = null; String networktype = null;
final int subId = mSir.getSubscriptionId(); final int subId = mSir.getSubscriptionId();
final int actualNetworkType = mTelephonyManager.getDataNetworkType( final int actualDataNetworkType = mTelephonyManager.getDataNetworkType(
mSir.getSubscriptionId()); mSir.getSubscriptionId());
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) { final int actualVoiceNetworkType = mTelephonyManager.getVoiceNetworkType(
networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType); mSir.getSubscriptionId());
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualDataNetworkType) {
networktype = mTelephonyManager.getNetworkTypeName(actualDataNetworkType);
} else if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualVoiceNetworkType) {
networktype = mTelephonyManager.getNetworkTypeName(actualVoiceNetworkType);
} }
setSummaryText(KEY_NETWORK_TYPE, networktype); setSummaryText(KEY_NETWORK_TYPE, networktype);