Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 531127a5 authored by Prem Kumar's avatar Prem Kumar Committed by Android (Google) Code Review
Browse files

Merge "SIM Status now shows data connection instead of voice." into lmp-mr1-dev

parents 9b1383a4 58f7eaf3
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -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);
    }