From 655c1be579abb093ba8ca921a1173951a150dae9 Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Wed, 7 Aug 2019 16:51:36 -0700 Subject: [PATCH] Allow radio info on phones with no subscription Some info is still helpful for debugging in these cases. Bug: 139074613 Test: manual Change-Id: Idbde691c60b53e0ab755df229a3a9dc77406934d Merged-In: Idbde691c60b53e0ab755df229a3a9dc77406934d --- src/com/android/settings/RadioInfo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java index 099b55d732b..3c10b8d3cc7 100644 --- a/src/com/android/settings/RadioInfo.java +++ b/src/com/android/settings/RadioInfo.java @@ -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); } }