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

Commit 7dd1718b authored by Mohammad Rahimpur's avatar Mohammad Rahimpur Committed by Amit Mahajan
Browse files

SAT: SET_UP_MENU missing minimum information

processSelectItem() is used for both SET_UP_MENU and
SELECT_ITEM command type and since Alpha Identifier
is optional for SELECT_ITEM, its existence is not
checked even for SET_UP_MENU.

Added the check to handle missing Alpha ID now.

Bug: 28201090
Change-Id: I65457b48c85dc0e9f67b7071dc27cb4e6b699c50
parent 596b8837
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -609,10 +609,20 @@ class CommandParamsFactory extends Handler {
        ItemsIconId itemsIconId = null;
        Iterator<ComprehensionTlv> iter = ctlvs.iterator();

        AppInterface.CommandType cmdType = AppInterface.CommandType
                .fromInt(cmdDet.typeOfCommand);

        ComprehensionTlv ctlv = searchForTag(ComprehensionTlvTag.ALPHA_ID,
                ctlvs);
        if (ctlv != null) {
            menu.title = ValueParser.retrieveAlphaId(ctlv);
        } else if (cmdType == AppInterface.CommandType.SET_UP_MENU) {
            // According to spec ETSI TS 102 223 section 6.10.3, the
            // Alpha ID is mandatory (and also part of minimum set of
            // elements required) for SET_UP_MENU. If it is not received
            // by ME, then ME should respond with "error: missing minimum
            // information" and not "command performed successfully".
            throw new ResultException(ResultCode.REQUIRED_VALUES_MISSING);
        }

        while (true) {