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

Commit e8fabb52 authored by Malcolm Chen's avatar Malcolm Chen
Browse files

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

In DSDS device, when user explicitly selects a SIM as data SIM, we
should not only set it as default data SIM in Telephony, but also
enable its data.

Bug: 120712558
Test: manual
Change-Id: I429efa090ebf5bb71ee491ae66525abee00f62c6
parent 566b2b8a
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();
    }