[Settings] Allow disabled SIM to be controlled in UI

Disabled SIM are hidden from UI due to the API only check if there's a
SIM with mobile data capability active within device.

Right now, the UI design has been changed. The UI here should be
accessible no mater with or without the support of mobile data.

Bug: 193820245
Bug: 194761536
Test: local
Change-Id: I9c8b8fa16e74cd0fe4419966cc97ad55b5b87b17
(cherry picked from commit 847f326cd4)
(cherry picked from commit a8ce9abde7)
This commit is contained in:
Bonian Chen
2021-07-20 19:32:50 +08:00
parent ae23247270
commit 3f0dc952ac
6 changed files with 273 additions and 71 deletions

View File

@@ -50,8 +50,7 @@ public class QueryEsimCardId implements Callable<AtomicIntegerArray> {
}
return new AtomicIntegerArray(cardInfos.stream()
.filter(Objects::nonNull)
.filter(cardInfo -> (!cardInfo.isRemovable()
&& (cardInfo.getCardId() != TelephonyManager.UNSUPPORTED_CARD_ID)))
.filter(cardInfo -> (!cardInfo.isRemovable() && (cardInfo.getCardId() >= 0)))
.mapToInt(UiccCardInfo::getCardId)
.toArray());
}