Merge "Allow radio info on phones with no subscription"

This commit is contained in:
Jordan Liu
2019-08-14 00:22:42 +00:00
committed by Gerrit Code Review

View File

@@ -1588,14 +1588,14 @@ public class RadioInfo extends Activity {
}
log("switching to phone " + phoneIndex);
// getSubId says it takes a slotIndex, but it actually takes a phone index
int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
int[] subIds = SubscriptionManager.getSubId(phoneIndex);
if (subIds == null || subIds.length < 1) {
log("no subscription found for phoneIndex " + phoneIndex);
return;
if (subIds != null && subIds.length > 0) {
subId = subIds[0];
}
mSelectedPhoneIndex = phoneIndex;
updatePhoneIndex(phoneIndex, subIds[0]);
updatePhoneIndex(phoneIndex, subId);
}
}