Display Voice nw type if Data nw is Unknown for Sprout.
For multisim device when default data connection is set to 1st sim, getDataNetworkType() returns Unknown for 2nd sim. In that case use getVoiceNetworkType() to display Cellular nw type in sim status. Bug: 18922147 Change-Id: Id7c39f8717737b60bde988cbd1c85ce8f6768a6f
This commit is contained in:
@@ -237,10 +237,14 @@ public class SimStatus extends PreferenceActivity {
|
||||
// Whether EDGE, UMTS, etc...
|
||||
String networktype = null;
|
||||
final int subId = mSir.getSubscriptionId();
|
||||
final int actualNetworkType = mTelephonyManager.getDataNetworkType(
|
||||
final int actualDataNetworkType = mTelephonyManager.getDataNetworkType(
|
||||
mSir.getSubscriptionId());
|
||||
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) {
|
||||
networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType);
|
||||
final int actualVoiceNetworkType = mTelephonyManager.getVoiceNetworkType(
|
||||
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);
|
||||
|
Reference in New Issue
Block a user