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

Commit cabc3ce2 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
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.

Change-Id: I66ca1d109450b8e857079c342a93de8086e80660
parent 6a552451
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -900,4 +900,13 @@ public abstract class BaseCommands implements CommandsInterface {
          mLceInfoRegistrant = null;
      }
    }

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

}
+6 −0
Original line number Diff line number Diff line
@@ -1681,6 +1681,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
+8 −0
Original line number Diff line number Diff line
@@ -2676,6 +2676,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        }
    }

    /**
     * Return if the current radio is LTE on GSM
     * @hide
     */
    public int getLteOnGsmMode() {
        return mCi.getLteOnGsmMode();
    }

    /**
     * TODO: Adding a function for each property is not good.
     * A fucntion of type getPhoneProp(propType) where propType is an
+10 −1
Original line number Diff line number Diff line
@@ -129,6 +129,15 @@ public class PhoneFactory {

                sPhoneNotifier = new DefaultPhoneNotifier();

                // Get preferred network mode
                int preferredNetworkMode = RILConstants.PREFERRED_NETWORK_MODE;
                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 cdmaSubscription = CdmaSubscriptionSourceManager.getDefault(context);
                Rlog.i(LOG_TAG, "Cdma Subscription set to " + cdmaSubscription);

@@ -144,7 +153,7 @@ public class PhoneFactory {
                for (int i = 0; i < numPhones; i++) {
                    // reads the system properties and makes commandsinterface
                    // Get preferred network type.
                    networkModes[i] = RILConstants.PREFERRED_NETWORK_MODE;
                    networkModes[i] = preferredNetworkMode;

                    Rlog.i(LOG_TAG, "Network Mode set to " + Integer.toString(networkModes[i]));
                    sCommandsInterfaces[i] = new RIL(context, networkModes[i],
+5 −0
Original line number Diff line number Diff line
@@ -1181,6 +1181,11 @@ public class SimulatedCommandsVerifier implements CommandsInterface {
        return 0;
    }

    @Override
    public int getLteOnGsmMode() {
        return 0;
    }

    @Override
    public void requestIsimAuthentication(String nonce, Message response) {