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
diff --git a/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java b/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java
index 2990da3..7cc9463 100755
--- a/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java
+++ b/src/java/com/android/internal/telephony/cat/CommandParamsFactory.java
@@ -609,10 +609,20 @@
         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) {