The Network Select shows wrong operator name

It get the empty subscriptionInfoList from
 SubscriptionManager#getAccessibleSubscriptionInfoList, so the UI
 shows default subId's operator.
 Since this item appears, when sim is active, using
 getActiveSubscriptionInfoList is enough.

 - https://screenshot.googleplex.com/9aHtDVpnYQBsiQr

Bug: 182020952
Test: atest MobileNetworkUtilsTest
atest OpenNetworkSelectPagePreferenceControllerTest

Change-Id: I0d86ec41236a0d1be657ccd57fd0cf90f96b8b89
This commit is contained in:
SongFerngWang
2021-04-09 18:31:02 +08:00
committed by Tom Hsu
parent 8477cf1892
commit 5c2b140483
3 changed files with 2 additions and 10 deletions

View File

@@ -132,8 +132,6 @@ public class MobileNetworkUtilsTest {
when(mSubscriptionManager.getActiveSubscriptionInfoList()).thenReturn(
Arrays.asList(mSubscriptionInfo1, mSubscriptionInfo2));
when(mSubscriptionManager.getAccessibleSubscriptionInfoList()).thenReturn(
Arrays.asList(mSubscriptionInfo1, mSubscriptionInfo2));
when(mTelephonyManager.getNetworkOperatorName()).thenReturn(
PLMN_FROM_TELEPHONY_MANAGER_API);

View File

@@ -88,8 +88,6 @@ public class OpenNetworkSelectPagePreferenceControllerTest {
when(mSubscriptionManager.getActiveSubscriptionInfoList()).thenReturn(
Arrays.asList(mSubscriptionInfo));
when(mSubscriptionManager.getAccessibleSubscriptionInfoList()).thenReturn(
Arrays.asList(mSubscriptionInfo));
when(mTelephonyManager.getNetworkOperatorName()).thenReturn(OPERATOR_NAME);