Merge "[Mainline] Use isActiveSubscriptionId instead of isActiveSubId for mainline"

This commit is contained in:
Betty Chang
2020-01-08 10:21:54 +00:00
committed by Android (Google) Code Review
6 changed files with 18 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ public class DisabledSubscriptionController extends BasePreferenceController imp
return;
}
// TODO b/135222940: re-evaluate whether to use mSubscriptionManager#isSubscriptionEnabled
mCategory.setVisible(mSubscriptionManager.isActiveSubId(mSubId));
mCategory.setVisible(mSubscriptionManager.isActiveSubscriptionId(mSubId));
}
@Override

View File

@@ -78,7 +78,7 @@ public class MobileNetworkSwitchController extends BasePreferenceController impl
mSwitchBar.addOnSwitchChangeListener((switchView, isChecked) -> {
// TODO b/135222940: re-evaluate whether to use
// mSubscriptionManager#isSubscriptionEnabled
if (mSubscriptionManager.isActiveSubId(mSubId) != isChecked
if (mSubscriptionManager.isActiveSubscriptionId(mSubId) != isChecked
&& (!mSubscriptionManager.setSubscriptionEnabled(mSubId, isChecked))) {
mSwitchBar.setChecked(!isChecked);
}
@@ -106,7 +106,7 @@ public class MobileNetworkSwitchController extends BasePreferenceController impl
mSwitchBar.hide();
} else {
mSwitchBar.show();
mSwitchBar.setChecked(mSubscriptionManager.isActiveSubId(mSubId));
mSwitchBar.setChecked(mSubscriptionManager.isActiveSubscriptionId(mSubId));
}
}

View File

@@ -103,7 +103,7 @@ public class SimSelectNotification extends BroadcastReceiver {
SubscriptionManager subscriptionManager = ((SubscriptionManager) context.getSystemService(
Context.TELEPHONY_SUBSCRIPTION_SERVICE));
if (!subscriptionManager.isActiveSubId(subId)) {
if (!subscriptionManager.isActiveSubscriptionId(subId)) {
Log.w(TAG, "onEnableMmsDataRequest invalid sub ID " + subId);
return;
}