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

Commit 4d88cdbf authored by Sandeep Kunta's avatar Sandeep Kunta Committed by Steve Kondik
Browse files

Telephony: Add support for NETWORK_TYPE_GSM

Add support for NETWORK_TYPE_GSM in TelephonyManager and
corresponding mapping in ServicState.java so that when
application queries getVoiceNetworkType() and currently
camped rat is GSM, they get network mode as GSM instead
of network mode unknown.

Change-Id: I5e971c625532696776b9555ad8cfd85eba4fc423
CRs-Fixed: 526435
parent b9ba4718
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -814,6 +814,8 @@ public class ServiceState implements Parcelable {
            return TelephonyManager.NETWORK_TYPE_DCHSPAP;
        case ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA:
            return TelephonyManager.NETWORK_TYPE_TD_SCDMA;
        case ServiceState.RIL_RADIO_TECHNOLOGY_GSM:
            return TelephonyManager.NETWORK_TYPE_GSM;
        default:
            return TelephonyManager.NETWORK_TYPE_UNKNOWN;
        }
+5 −0
Original line number Diff line number Diff line
@@ -645,6 +645,8 @@ public class TelephonyManager {
    public static final int NETWORK_TYPE_EHRPD = 14;
    /** Current network is HSPA+ */
    public static final int NETWORK_TYPE_HSPAP = 15;
    /** Current network is GSM {@hide} */
    public static final int NETWORK_TYPE_GSM = 16;
    /** Current network is TD_SCDMA {@hide} */
    public static final int NETWORK_TYPE_TD_SCDMA = 17;
    /** Current network is DC-HSPAP
@@ -755,6 +757,7 @@ public class TelephonyManager {
    public static int getNetworkClass(int networkType) {
        switch (networkType) {
            case NETWORK_TYPE_GPRS:
            case NETWORK_TYPE_GSM:
            case NETWORK_TYPE_EDGE:
            case NETWORK_TYPE_CDMA:
            case NETWORK_TYPE_1xRTT:
@@ -825,6 +828,8 @@ public class TelephonyManager {
                return "HSPA+";
            case NETWORK_TYPE_DCHSPAP:
                return "DCHSPAP";
            case NETWORK_TYPE_GSM:
                return "GSM";
            case NETWORK_TYPE_TD_SCDMA:
                return "TD_SCDMA";
            default: