Merge "Allow radio info on phones with no subscription" am: 19d1f890a0
am: b377a593b7
Change-Id: Ibe68e60583fdf2bd08d6d8f62b5c942878dd160e
This commit is contained in:
@@ -1621,14 +1621,14 @@ public class RadioInfo extends Activity {
|
|||||||
}
|
}
|
||||||
log("switching to phone " + phoneIndex);
|
log("switching to phone " + phoneIndex);
|
||||||
// getSubId says it takes a slotIndex, but it actually takes a phone index
|
// getSubId says it takes a slotIndex, but it actually takes a phone index
|
||||||
|
int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||||
int[] subIds = SubscriptionManager.getSubId(phoneIndex);
|
int[] subIds = SubscriptionManager.getSubId(phoneIndex);
|
||||||
if (subIds == null || subIds.length < 1) {
|
if (subIds != null && subIds.length > 0) {
|
||||||
log("no subscription found for phoneIndex " + phoneIndex);
|
subId = subIds[0];
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
mSelectedPhoneIndex = phoneIndex;
|
mSelectedPhoneIndex = phoneIndex;
|
||||||
|
|
||||||
updatePhoneIndex(phoneIndex, subIds[0]);
|
updatePhoneIndex(phoneIndex, subId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user