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

Commit b022aa38 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "Power Widget: Enable LTE switch for Power Widget" into jellybean

parents 7d283b2b f06f264c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,12 +51,12 @@ public class LTEButton extends PowerButton{
        ContentResolver resolver = context.getContentResolver();
        if (Phone.NT_MODE_GLOBAL == network ||
              Phone.NT_MODE_LTE_GSM_WCDMA == network) {
            //tm.toggleLTE(false);                                   // TODO: ******* Disabled for now ************
            tm.toggleLTE(false);
            mState = STATE_DISABLED;
            Settings.System.putInt(resolver, Settings.System.LTE_MODE, 0);
        } else if (Phone.NT_MODE_CDMA == network ||
                     tm.getLteOnGsmMode() != 0) {
            //tm.toggleLTE(true);                                    // TODO: ******* Disabled for now ************
            tm.toggleLTE(true);
            mState = STATE_ENABLED;
            Settings.System.putInt(resolver, Settings.System.LTE_MODE, 1);
        }
+11 −0
Original line number Diff line number Diff line
@@ -473,6 +473,17 @@ public class TelephonyManager {
        }
    }

    /**
     * {@hide}
     */
    public void toggleLTE(boolean on) {
        try {
            getITelephony().toggleLTE(on);
        } catch (RemoteException e) {
            //Silently fail
        }
    }

    /** Unknown network class. {@hide} */
    public static final int NETWORK_CLASS_UNKNOWN = 0;
    /** Class of broadly defined "2G" networks. {@hide} */
+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,12 @@ interface ITelephony {
     */
    void call(String number);

    /**
     * Toggle between 3G and LTE (NT_MODE_CDMA, NT_MODE_GLOBAL)
     * @param boolean to turn on and off LTE
     */
    void toggleLTE(boolean on);

    /**
     * If there is currently a call in progress, show the call screen.
     * The DTMF dialpad may or may not be visible initially, depending on