public String processCommand(String command) { BaseCmd commandCmd = null; int cmd_result = BaseCmd.COMMAND_OK; String result = COMMAND_OK_STR; for (int i = 0; i <= m_command_list.size(); i++) { commandCmd = m_command_list.get(Integer.valueOf(i)); if (commandCmd == null) { continue; } cmd_result = commandCmd.checkCommand(command); if (cmd_result == BaseCmd.COMMAND_UNSUPPORTED) { continue; } else if (cmd_result == BaseCmd.COMMAND_SUGGESTION) { result = commandCmd.getCmdName(); return result; } else { Log.d(TAG, "processing command: " + command); cmd_result = commandCmd.process(); break; } } return result; }