SIM Status now shows data connection instead of voice.
Bug: 18714691 Change-Id: Ia2e9642d3331126a040ae1a059300df65d9551b9
This commit is contained in:
@@ -236,16 +236,11 @@ public class SimStatus extends PreferenceActivity {
|
|||||||
private void updateNetworkType() {
|
private void updateNetworkType() {
|
||||||
// Whether EDGE, UMTS, etc...
|
// Whether EDGE, UMTS, etc...
|
||||||
String networktype = null;
|
String networktype = null;
|
||||||
final ITelephony telephony = ITelephony.Stub.asInterface(
|
final int subId = mSir.getSubscriptionId();
|
||||||
ServiceManager.getService(Context.TELEPHONY_SERVICE));
|
final int actualNetworkType = mTelephonyManager.getDataNetworkType(
|
||||||
try {
|
mSir.getSubscriptionId());
|
||||||
final int actualNetworkType = telephony.getVoiceNetworkTypeForSubscriber(
|
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) {
|
||||||
mSir.getSubscriptionId());
|
networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType);
|
||||||
if (TelephonyManager.NETWORK_TYPE_UNKNOWN != actualNetworkType) {
|
|
||||||
networktype = mTelephonyManager.getNetworkTypeName(actualNetworkType);
|
|
||||||
}
|
|
||||||
} catch (RemoteException remoteException){
|
|
||||||
// Do nothing, networkType will remain null.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setSummaryText(KEY_NETWORK_TYPE, networktype);
|
setSummaryText(KEY_NETWORK_TYPE, networktype);
|
||||||
|
Reference in New Issue
Block a user