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

Commit 15961beb authored by Takanori Nakano's avatar Takanori Nakano Committed by Yoshiaki Naka
Browse files

GET INPUT command can contain the duration information

GET INPUT command can contain the duration information as an optional
parameter and it should be handled in the same manner as GET INKEY
command from ETSI TS 102 223 v14.0.0 onward.

Bug: 66984843
Test: Confirmed that the duration of GET INPUT is treated as expected

Change-Id: I4aab2804419d9b2c87a8d864fdbf31a66a47580a
parent 39167630
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -625,10 +625,12 @@ public class CatService extends Handler implements AppInterface {
        CommandType cmdType = AppInterface.CommandType.fromInt(cmdDet.typeOfCommand);
        if (cmdType != null) {
            switch (cmdType) {
                case GET_INPUT:
                case GET_INKEY:
                    // ETSI TS 102 384,27.22.4.2.8.4.2.
                    // If it is a response for GET_INKEY command and the response timeout
                    // occured, then add DURATION TLV for variable timeout case.
                    // Please refer to the clause 6.8.21 of ETSI 102.223.
                    // The terminal shall supply the command execution duration
                    // when it issues TERMINAL RESPONSE for GET INKEY command with variable timeout.
                    // GET INPUT command should also be handled in the same manner.
                    if ((resultCode.value() == ResultCode.NO_RESPONSE_FROM_USER.value()) &&
                        (cmdInput != null) && (cmdInput.duration != null)) {
                        getInKeyResponse(buf, cmdInput);
+5 −0
Original line number Diff line number Diff line
@@ -549,6 +549,11 @@ class CommandParamsFactory extends Handler {
            input.iconSelfExplanatory = iconId.selfExplanatory;
        }

        ctlv = searchForTag(ComprehensionTlvTag.DURATION, ctlvs);
        if (ctlv != null) {
            input.duration = ValueParser.retrieveDuration(ctlv);
        }

        input.digitOnly = (cmdDet.commandQualifier & 0x01) == 0;
        input.ucs2 = (cmdDet.commandQualifier & 0x02) != 0;
        input.echo = (cmdDet.commandQualifier & 0x04) == 0;