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

Commit a8054aa1 authored by Suresh Koleti's avatar Suresh Koleti Committed by Ricardo Cerqueira
Browse files

MSim: Add support to enable/disable mobile data

Extending mobile data api's per subscription

Change-Id: I5f411ab9a986130313181fcd936bc909b07ad2fb
parent 3388ccc8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -3374,8 +3374,14 @@ public class TelephonyManager {
    /** @hide */
    @SystemApi
    public void setDataEnabled(boolean enable) {
        setDataEnabledUsingSubId(getDefaultSubscription(), enable);
    }

    /** @hide */
    @SystemApi
    public void setDataEnabledUsingSubId(long subId, boolean enable) {
        try {
            getITelephony().setDataEnabled(enable);
            getITelephony().setDataEnabledUsingSubId(subId, enable);
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelephony#setDataEnabled", e);
        }
+7 −0
Original line number Diff line number Diff line
@@ -649,6 +649,13 @@ interface ITelephony {
     */
    void setDataEnabled(boolean enable);

    /**
     * User enable/disable Mobile Data per subscription.
     *
     * @param enable true to turn on, else false
     */
    void setDataEnabledUsingSubId(long subId, boolean enable);

    /**
     * Get the user enabled state of Mobile Data.
     *