[Settings] Fix problem that MobileNetworkActivity show wrong Info.

- UiccSlotInfo only provide current active slots. It doesn't provide
 inactive slot. Thus,it should not use it for checking sim existed.

Bug: 194022251
Bug: 194378040
Test: Maunal test
Change-Id: I00a3fcf3f700bee804bad12039d6d13a1404cc74
This commit is contained in:
tom hsu
2021-07-24 06:12:30 +08:00
committed by Tom Hsu
parent 7c55ea3fc0
commit 01f43ff290

View File

@@ -100,11 +100,10 @@ public class SubscriptionAnnotation {
return; return;
} }
mIsExisted = simSlotIndex.contains(mSubInfo.getSimSlotIndex()); mIsExisted = true;
mIsActive = activeSimSlotIndexList.contains(mSubInfo.getSimSlotIndex()); mIsActive = (mSubInfo.getSimSlotIndex() > SubscriptionManager.INVALID_SIM_SLOT_INDEX)
if (mIsExisted) { && activeSimSlotIndexList.contains(mSubInfo.getSimSlotIndex());
mIsAllowToDisplay = isDisplayAllowed(context); mIsAllowToDisplay = isDisplayAllowed(context);
}
} }
// the index provided during construction of Builder // the index provided during construction of Builder