use of com.android.internal.telephony.uicc.IccCardApplicationStatus in project android_frameworks_opt_telephony by LineageOS.
the class RadioResponse method convertHalCardStatus_1_5.
private IccCardStatus convertHalCardStatus_1_5(android.hardware.radio.V1_5.CardStatus cardStatus) {
IccCardStatus iccCardStatus = new IccCardStatus();
iccCardStatus.setCardState(cardStatus.base.base.base.cardState);
iccCardStatus.setUniversalPinState(cardStatus.base.base.base.universalPinState);
iccCardStatus.mGsmUmtsSubscriptionAppIndex = cardStatus.base.base.base.gsmUmtsSubscriptionAppIndex;
iccCardStatus.mCdmaSubscriptionAppIndex = cardStatus.base.base.base.cdmaSubscriptionAppIndex;
iccCardStatus.mImsSubscriptionAppIndex = cardStatus.base.base.base.imsSubscriptionAppIndex;
iccCardStatus.physicalSlotIndex = cardStatus.base.base.physicalSlotId;
iccCardStatus.atr = cardStatus.base.base.atr;
iccCardStatus.iccid = cardStatus.base.base.iccid;
iccCardStatus.eid = cardStatus.base.eid;
int numApplications = cardStatus.applications.size();
// limit to maximum allowed applications
if (numApplications > com.android.internal.telephony.uicc.IccCardStatus.CARD_MAX_APPS) {
numApplications = com.android.internal.telephony.uicc.IccCardStatus.CARD_MAX_APPS;
}
iccCardStatus.mApplications = new IccCardApplicationStatus[numApplications];
for (int i = 0; i < numApplications; i++) {
android.hardware.radio.V1_5.AppStatus rilAppStatus = cardStatus.applications.get(i);
IccCardApplicationStatus appStatus = new IccCardApplicationStatus();
appStatus.app_type = appStatus.AppTypeFromRILInt(rilAppStatus.base.appType);
appStatus.app_state = appStatus.AppStateFromRILInt(rilAppStatus.base.appState);
appStatus.perso_substate = appStatus.PersoSubstateFromRILInt(rilAppStatus.persoSubstate);
appStatus.aid = rilAppStatus.base.aidPtr;
appStatus.app_label = rilAppStatus.base.appLabelPtr;
appStatus.pin1_replaced = rilAppStatus.base.pin1Replaced;
appStatus.pin1 = appStatus.PinStateFromRILInt(rilAppStatus.base.pin1);
appStatus.pin2 = appStatus.PinStateFromRILInt(rilAppStatus.base.pin2);
iccCardStatus.mApplications[i] = appStatus;
mRil.riljLog("IccCardApplicationStatus " + i + ":" + appStatus.toString());
}
return iccCardStatus;
}
use of com.android.internal.telephony.uicc.IccCardApplicationStatus in project android_frameworks_opt_telephony by LineageOS.
the class RadioResponse method convertHalCardStatus.
private IccCardStatus convertHalCardStatus(CardStatus cardStatus) {
IccCardStatus iccCardStatus = new IccCardStatus();
iccCardStatus.setCardState(cardStatus.cardState);
iccCardStatus.setUniversalPinState(cardStatus.universalPinState);
iccCardStatus.mGsmUmtsSubscriptionAppIndex = cardStatus.gsmUmtsSubscriptionAppIndex;
iccCardStatus.mCdmaSubscriptionAppIndex = cardStatus.cdmaSubscriptionAppIndex;
iccCardStatus.mImsSubscriptionAppIndex = cardStatus.imsSubscriptionAppIndex;
int numApplications = cardStatus.applications.size();
// limit to maximum allowed applications
if (numApplications > com.android.internal.telephony.uicc.IccCardStatus.CARD_MAX_APPS) {
numApplications = com.android.internal.telephony.uicc.IccCardStatus.CARD_MAX_APPS;
}
iccCardStatus.mApplications = new IccCardApplicationStatus[numApplications];
for (int i = 0; i < numApplications; i++) {
AppStatus rilAppStatus = cardStatus.applications.get(i);
IccCardApplicationStatus appStatus = new IccCardApplicationStatus();
appStatus.app_type = appStatus.AppTypeFromRILInt(rilAppStatus.appType);
appStatus.app_state = appStatus.AppStateFromRILInt(rilAppStatus.appState);
appStatus.perso_substate = appStatus.PersoSubstateFromRILInt(rilAppStatus.persoSubstate);
appStatus.aid = rilAppStatus.aidPtr;
appStatus.app_label = rilAppStatus.appLabelPtr;
appStatus.pin1_replaced = rilAppStatus.pin1Replaced;
appStatus.pin1 = appStatus.PinStateFromRILInt(rilAppStatus.pin1);
appStatus.pin2 = appStatus.PinStateFromRILInt(rilAppStatus.pin2);
iccCardStatus.mApplications[i] = appStatus;
mRil.riljLog("IccCardApplicationStatus " + i + ":" + appStatus.toString());
}
return iccCardStatus;
}
Aggregations