Account for PhoneMonitor API change

* Needed after:
84a90870aa

Change-Id: Ie6c28388f28b97af273f7c93fc6b5b56b518370a
This commit is contained in:
Chirayu Desai
2019-09-13 03:11:24 +05:30
committed by Bruno Martins
parent b0f5aa9540
commit ec3e5ccaaa
2 changed files with 12 additions and 8 deletions

View File

@@ -98,7 +98,7 @@ public class SetupWizardUtils {
android.provider.Settings.Global.putInt(context.getContentResolver(),
android.provider.Settings.Global.MOBILE_DATA + phoneId, enabled ? 1 : 0);
int subId = SubscriptionManager.getDefaultDataSubscriptionId();
tm.setDataEnabled(subId, enabled);
tm.createForSubscriptionId(subId).setDataEnabled(enabled);
} else {
android.provider.Settings.Global.putInt(context.getContentResolver(),
android.provider.Settings.Global.MOBILE_DATA, enabled ? 1 : 0);