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

Commit 33cec8e6 authored by Mike Kasick's avatar Mike Kasick Committed by Steve Kondik
Browse files

PowerWidget: Re-enable LTE button.

- Implement toggleLTE,
  from CM 10.0: I3f7521f5ec4e9f9106c58afd4d5b10c7086b55fd.
- Support all LTE network modes defined in RILConstants and
  com.android.internal.telephony.Phone.
- Cleanup: Remove unused LTE_MODE, restrict state change to updateState.
- Also use Settings.Global.getInt() for PREFERRED_NETWORK_MODE.

Change-Id: I43bb2491d650d641d243d3cb67ee80bc7c8f5cdf
parent 787f6952
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -1436,6 +1436,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 −1
Original line number Diff line number Diff line
@@ -47,9 +47,14 @@ interface ITelephony {
     */
    void call(String callingPackage, 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);

    /**
     * End call if there is a call in progress, otherwise does nothing.
     *
     * @return whether it hung up
     */
    boolean endCall();