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

Commit 9ed31967 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Mike Kasick
Browse files

Telephony: Add getLteOnGsmMode() method (2/2)

Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property

From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
- Moved getLteOnGsmModeStatic() to TelephonyManager.
parent d34549b5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -644,4 +644,12 @@ public abstract class BaseCommands implements CommandsInterface {

    @Override
    public void testingEmergencyCall() {}

    /**
     * @hide
     */
    @Override
    public int getLteOnGsmMode() {
        return TelephonyManager.getLteOnGsmModeStatic();
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -1562,6 +1562,12 @@ public interface CommandsInterface {
     */
    public int getLteOnCdmaMode();

    /**
     * Return if the current radio is LTE on GSM
     * @hide
     */
    public int getLteOnGsmMode();

    /**
     * Request the ISIM application on the UICC to perform the AKA
     * challenge/response algorithm for IMS authentication. The nonce string
+6 −0
Original line number Diff line number Diff line
@@ -1649,6 +1649,12 @@ public interface Phone {
     */
    public int getLteOnCdmaMode();

    /**
     * Return if the current radio is LTE on GSM
     * @hide
     */
    public int getLteOnGsmMode();

    /**
     * TODO: Adding a function for each property is not good.
     * A fucntion of type getPhoneProp(propType) where propType is an
+8 −0
Original line number Diff line number Diff line
@@ -1191,6 +1191,14 @@ public abstract class PhoneBase extends Handler implements Phone {
        return mCM.getLteOnCdmaMode();
    }

    /**
     * {@hide}
     */
    @Override
    public int getLteOnGsmMode() {
        return mCM.getLteOnGsmMode();
    }

    /**
     * Sets the SIM voice message waiting indicator records.
     * @param line GSM Subscriber Profile Number, one-based. Only '1' is supported
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ public class PhoneFactory {
                if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) {
                    preferredNetworkMode = Phone.NT_MODE_GLOBAL;
                }
                if (TelephonyManager.getLteOnGsmModeStatic() != 0) {
                    preferredNetworkMode = Phone.NT_MODE_LTE_GSM_WCDMA;
                }
                int networkMode = Settings.Global.getInt(context.getContentResolver(),
                        Settings.Global.PREFERRED_NETWORK_MODE, preferredNetworkMode);
                Log.i(LOG_TAG, "Network Mode set to " + Integer.toString(networkMode));
Loading