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

Commit 09f76a02 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Android (Google) Code Review
Browse files

Merge "Enable data when user selects default data through popped up dialog."

parents 175b7b92 e8fabb52
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -118,7 +118,10 @@ public class SimDialogActivity extends Activity {

    private static void setDefaultDataSubId(final Context context, final int subId) {
        final SubscriptionManager subscriptionManager = SubscriptionManager.from(context);
        final TelephonyManager telephonyManager = TelephonyManager.from(context)
                .createForSubscriptionId(subId);
        subscriptionManager.setDefaultDataSubId(subId);
        telephonyManager.setDataEnabled(true);
        Toast.makeText(context, R.string.data_switch_started, Toast.LENGTH_LONG).show();
    }