Use active instead of available subscriptions in 2 places
In a couple of places we were showing DSDS UI using the list of *available* subscriptions instead of the list of *active* ones. This difference is relevant for instance if you have multiple eSIM profiles - in typical hardware only one of those can be active at one time. This CL fixes that problem in two places: 1) The header at the top of the Network & internet page 2) The ListPreference's on the mobile network detail page for selecting the default subscription for Calls / SMS. Fixes: 129673046 Test: make RunSettingsRoboTests Change-Id: I891c856bdd4516286fcee1067684d9161ceaca80
This commit is contained in:
@@ -129,7 +129,7 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
|
||||
mSubscriptionPreferences = new ArrayMap<>();
|
||||
|
||||
int order = mStartOrder;
|
||||
for (SubscriptionInfo info : SubscriptionUtil.getAvailableSubscriptions(mManager)) {
|
||||
for (SubscriptionInfo info : SubscriptionUtil.getActiveSubscriptions(mManager)) {
|
||||
final int subId = info.getSubscriptionId();
|
||||
Preference pref = existingPrefs.remove(subId);
|
||||
if (pref == null) {
|
||||
@@ -216,7 +216,7 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
|
||||
if (mSubscriptionsListener.isAirplaneModeOn()) {
|
||||
return false;
|
||||
}
|
||||
return SubscriptionUtil.getAvailableSubscriptions(mManager).size() >= 2;
|
||||
return SubscriptionUtil.getActiveSubscriptions(mManager).size() >= 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user