{
SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Is command type supported");
+ if (NULL == support) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid parameter, support is NULL ptr");
+ return VC_ERROR_INVALID_PARAMETER;
+ }
+
vc_state_e state;
if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
{
SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Enable Command Type, cmd_type(%d)", cmd_type);
+ if (VC_COMMAND_TYPE_FOREGROUND > cmd_type || VC_COMMAND_TYPE_EXCLUSIVE < cmd_type) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] cmd type is not valid, (%d)", cmd_type);
+ return VC_ERROR_INVALID_PARAMETER;
+ }
+
vc_state_e state;
if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
{
SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Disable Command Type, cmd_type(%d)", cmd_type);
+ if (VC_COMMAND_TYPE_FOREGROUND > cmd_type || VC_COMMAND_TYPE_EXCLUSIVE < cmd_type) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] cmd type is not valid, (%d)", cmd_type);
+ return VC_ERROR_INVALID_PARAMETER;
+ }
+
vc_state_e state;
if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
/* check type */
if (VC_COMMAND_TYPE_FOREGROUND > type || VC_COMMAND_TYPE_EXCLUSIVE < type) {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Invalid command type: input type is %d", type);
- SLOG(LOG_DEBUG, TAG_VCC, "@@@");
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid command type: input type is %d", type);
+ SLOG(LOG_DEBUG, TAG_VCM, "@@@");
return VC_ERROR_INVALID_PARAMETER;
}
{
SLOG(LOG_ERROR, TAG_VCM, "@@@ [Manager] Set preloaded command list");
+ if (NULL == file_path) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid parameter, file_path is NULL ptr");
+ return VC_ERROR_INVALID_PARAMETER;
+ } else {
+ SLOG(LOG_ERROR, TAG_VCM, "@@@ File path: %s", file_path);
+ }
+
vc_state_e state;
if (0 != vc_mgr_client_get_client_state(g_vc_m, &state)) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
{
int ret = -1;
+ if (NULL == mode) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Invalid parameter, mode is NULL ptr");
+ return VC_ERROR_INVALID_PARAMETER;
+ }
+
ret = vc_mgr_client_get_recognition_mode(g_vc_m, mode);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to get recognition mode");