Search in sources :

Example 1 with IccCardStatus

use of com.android.internal.telephony.uicc.IccCardStatus in project android_frameworks_opt_telephony by LineageOS.

the class RadioResponse method responseIccCardStatus_1_4.

private void responseIccCardStatus_1_4(RadioResponseInfo responseInfo, android.hardware.radio.V1_4.CardStatus cardStatus) {
    RILRequest rr = mRil.processResponse(responseInfo);
    if (rr != null) {
        IccCardStatus iccCardStatus = convertHalCardStatus(cardStatus.base.base);
        iccCardStatus.physicalSlotIndex = cardStatus.base.physicalSlotId;
        iccCardStatus.atr = cardStatus.base.atr;
        iccCardStatus.iccid = cardStatus.base.iccid;
        iccCardStatus.eid = cardStatus.eid;
        mRil.riljLog("responseIccCardStatus: from HIDL: " + iccCardStatus);
        if (responseInfo.error == RadioError.NONE) {
            sendMessageResponse(rr.mResult, iccCardStatus);
        }
        mRil.processResponseDone(rr, responseInfo, iccCardStatus);
    }
}
Also used : IccCardStatus(com.android.internal.telephony.uicc.IccCardStatus)

Example 2 with IccCardStatus

use of com.android.internal.telephony.uicc.IccCardStatus in project android_frameworks_opt_telephony by LineageOS.

the class RadioResponse method responseIccCardStatus.

private void responseIccCardStatus(RadioResponseInfo responseInfo, CardStatus cardStatus) {
    RILRequest rr = mRil.processResponse(responseInfo);
    if (rr != null) {
        IccCardStatus iccCardStatus = convertHalCardStatus(cardStatus);
        mRil.riljLog("responseIccCardStatus: from HIDL: " + iccCardStatus);
        if (responseInfo.error == RadioError.NONE) {
            sendMessageResponse(rr.mResult, iccCardStatus);
        }
        mRil.processResponseDone(rr, responseInfo, iccCardStatus);
    }
}
Also used : IccCardStatus(com.android.internal.telephony.uicc.IccCardStatus)

Example 3 with IccCardStatus

use of com.android.internal.telephony.uicc.IccCardStatus in project android_frameworks_opt_telephony by LineageOS.

the class RadioResponse method responseIccCardStatus_1_2.

private void responseIccCardStatus_1_2(RadioResponseInfo responseInfo, android.hardware.radio.V1_2.CardStatus cardStatus) {
    RILRequest rr = mRil.processResponse(responseInfo);
    if (rr != null) {
        IccCardStatus iccCardStatus = convertHalCardStatus(cardStatus.base);
        iccCardStatus.physicalSlotIndex = cardStatus.physicalSlotId;
        iccCardStatus.atr = cardStatus.atr;
        iccCardStatus.iccid = cardStatus.iccid;
        mRil.riljLog("responseIccCardStatus: from HIDL: " + iccCardStatus);
        if (responseInfo.error == RadioError.NONE) {
            sendMessageResponse(rr.mResult, iccCardStatus);
        }
        mRil.processResponseDone(rr, responseInfo, iccCardStatus);
    }
}
Also used : IccCardStatus(com.android.internal.telephony.uicc.IccCardStatus)

Example 4 with IccCardStatus

use of com.android.internal.telephony.uicc.IccCardStatus 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;
}
Also used : IccCardStatus(com.android.internal.telephony.uicc.IccCardStatus) IccCardApplicationStatus(com.android.internal.telephony.uicc.IccCardApplicationStatus)

Example 5 with IccCardStatus

use of com.android.internal.telephony.uicc.IccCardStatus in project android_frameworks_opt_telephony by LineageOS.

the class RadioResponse method responseIccCardStatus_1_5.

private void responseIccCardStatus_1_5(RadioResponseInfo responseInfo, android.hardware.radio.V1_5.CardStatus cardStatus) {
    RILRequest rr = mRil.processResponse(responseInfo);
    if (rr != null) {
        IccCardStatus iccCardStatus = convertHalCardStatus_1_5(cardStatus);
        mRil.riljLog("responseIccCardStatus: from HIDL: " + iccCardStatus);
        if (responseInfo.error == RadioError.NONE) {
            sendMessageResponse(rr.mResult, iccCardStatus);
        }
        mRil.processResponseDone(rr, responseInfo, iccCardStatus);
    }
}
Also used : IccCardStatus(com.android.internal.telephony.uicc.IccCardStatus)

Aggregations

IccCardStatus (com.android.internal.telephony.uicc.IccCardStatus)6 IccCardApplicationStatus (com.android.internal.telephony.uicc.IccCardApplicationStatus)2 AppStatus (android.hardware.radio.V1_0.AppStatus)1