[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 commit847f326cd4) (cherry picked from commita8ce9abde7)
This commit is contained in:
@@ -93,10 +93,9 @@ public class SubscriptionAnnotation {
|
||||
if (mType == TYPE_ESIM) {
|
||||
int cardId = mSubInfo.getCardId();
|
||||
mIsExisted = eSimCardId.contains(cardId);
|
||||
if (mIsExisted) {
|
||||
mIsActive = activeSimSlotIndexList.contains(mSubInfo.getSimSlotIndex());
|
||||
mIsAllowToDisplay = isDisplayAllowed(context);
|
||||
}
|
||||
mIsActive = activeSimSlotIndexList.contains(mSubInfo.getSimSlotIndex());
|
||||
mIsAllowToDisplay = (cardId < 0) // always allow when eSIM not in slot
|
||||
|| isDisplayAllowed(context);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -159,4 +158,11 @@ public class SubscriptionAnnotation {
|
||||
return SubscriptionUtil.isSubscriptionVisible(
|
||||
context.getSystemService(SubscriptionManager.class), context, mSubInfo);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return TAG + "{" + "subId=" + getSubscriptionId()
|
||||
+ ",type=" + getType() + ",exist=" + isExisted()
|
||||
+ ",active=" + isActive() + ",displayAllow=" + isDisplayAllowed()
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user