Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8ec3d2c authored by Yoshiaki Naka's avatar Yoshiaki Naka
Browse files

Support the alpha identifier of REFRESH command

According to the clause 6.4.7 of ETSI TS 102 223, the terminal shall use
the alpha identifier to inform the user if it is provided in the REFRESH
command and is not a null data object. The idle mode text shall also be
removed when the terminal receives the REFRESH command with "reset" or
"initialization", but there is another trigger to do it. Please refer to
the broadcast "com.android.internal.stk.icc_status_change".

Bug: 70370632
Test: Confirmed the expected behavior and no degradation.

Change-Id: I76534a791efe371f8265c7a24bb6ddeead58ec47
parent b950e5bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ public class CatCmdMessage implements Parcelable {
        case SET_UP_IDLE_MODE_TEXT:
        case SEND_DTMF:
        case SEND_SMS:
        case REFRESH:
        case RUN_AT:
        case SEND_SS:
        case SEND_USSD:
@@ -122,7 +123,6 @@ public class CatCmdMessage implements Parcelable {
            mSetupEventListSettings.eventList = ((SetEventListParams) cmdParams).mEventInfo;
            break;
        case PROVIDE_LOCAL_INFORMATION:
        case REFRESH:
        default:
            break;
        }
+1 −5
Original line number Diff line number Diff line
@@ -395,11 +395,6 @@ public class CatService extends Handler implements AppInterface {
                break;
            case DISPLAY_TEXT:
                break;
            case REFRESH:
                // ME side only handles refresh commands which meant to remove IDLE
                // MODE TEXT.
                cmdParams.mCmdDet.typeOfCommand = CommandType.SET_UP_IDLE_MODE_TEXT.value();
                break;
            case SET_UP_IDLE_MODE_TEXT:
                resultCode = cmdParams.mLoadIconFailed ? ResultCode.PRFRMD_ICON_NOT_DISPLAYED
                                                                            : ResultCode.OK;
@@ -440,6 +435,7 @@ public class CatService extends Handler implements AppInterface {
            case GET_INPUT:
            case GET_INKEY:
                break;
            case REFRESH:
            case RUN_AT:
                if (STK_DEFAULT.equals(((DisplayTextParams)cmdParams).mTextMsg.text)) {
                    // Remove the default text which was temporarily added and shall not be shown
+1 −36
Original line number Diff line number Diff line
@@ -61,12 +61,6 @@ class CommandParamsFactory extends Handler {
    static final int LOAD_SINGLE_ICON       = 1;
    static final int LOAD_MULTI_ICONS       = 2;

    // Command Qualifier values for refresh command
    static final int REFRESH_NAA_INIT_AND_FULL_FILE_CHANGE  = 0x00;
    static final int REFRESH_NAA_INIT_AND_FILE_CHANGE       = 0x02;
    static final int REFRESH_NAA_INIT                       = 0x03;
    static final int REFRESH_UICC_RESET                     = 0x04;

    // Command Qualifier values for PLI command
    static final int DTTZ_SETTING                           = 0x03;
    static final int LANGUAGE_SETTING                       = 0x04;
@@ -188,6 +182,7 @@ class CommandParamsFactory extends Handler {
                 break;
             case SEND_DTMF:
             case SEND_SMS:
             case REFRESH:
             case RUN_AT:
             case SEND_SS:
             case SEND_USSD:
@@ -197,10 +192,6 @@ class CommandParamsFactory extends Handler {
             case SET_UP_CALL:
                 cmdPending = processSetupCall(cmdDet, ctlvs);
                 break;
             case REFRESH:
                processRefresh(cmdDet, ctlvs);
                cmdPending = false;
                break;
             case LAUNCH_BROWSER:
                 cmdPending = processLaunchBrowser(cmdDet, ctlvs);
                 break;
@@ -585,32 +576,6 @@ class CommandParamsFactory extends Handler {
        return false;
    }

    /**
     * Processes REFRESH proactive command from the SIM card.
     *
     * @param cmdDet Command Details container object.
     * @param ctlvs List of ComprehensionTlv objects following Command Details
     *        object and Device Identities object within the proactive command
     */
    private boolean processRefresh(CommandDetails cmdDet,
            List<ComprehensionTlv> ctlvs) {

        CatLog.d(this, "process Refresh");

        // REFRESH proactive command is rerouted by the baseband and handled by
        // the telephony layer. IDLE TEXT should be removed for a REFRESH command
        // with "initialization" or "reset"
        switch (cmdDet.commandQualifier) {
        case REFRESH_NAA_INIT_AND_FULL_FILE_CHANGE:
        case REFRESH_NAA_INIT_AND_FILE_CHANGE:
        case REFRESH_NAA_INIT:
        case REFRESH_UICC_RESET:
            mCmdParams = new DisplayTextParams(cmdDet, null);
            break;
        }
        return false;
    }

    /**
     * Processes SELECT_ITEM proactive command from the SIM card.
     *