dbg("_callmgr_util_launch_ciss");
app_control_h app_control = NULL;
- int ret = 0;
-
- ret = app_control_create(&app_control);
- if (ret < 0) {
- warn("app_control_create() return error : %d", ret);
- return -1;
+ int ret = 0, err = 0;
+ char *ciss_pkg_name = NULL;
+ char *sim_slot_id_string = NULL;
+
+ err = app_control_create(&app_control);
+ if (err < 0) {
+ warn("app_control_create() return error : %d", err);
+ ret = -1;
+ goto EXIT;
}
- char *sim_slot_id_string = (char *)calloc(2, sizeof(char));
+ sim_slot_id_string = (char *)calloc(2, sizeof(char));
if (sim_slot_id_string == NULL) {
- app_control_destroy(app_control);
- return -1;
+ ret = -1;
+ goto EXIT;
}
sim_slot_id_string[0] = (char)(sim_slot + '0');
sim_slot_id_string[1] = '\0';
- if (app_control_set_app_id(app_control, CISS_AUL_CMD) != APP_CONTROL_ERROR_NONE) {
+ /* To support wearable ciss app since Tizen 5.0 version, should get pkg name base on profile */
+ _callmgr_util_get_pkg_name(CM_UTIL_PKG_ID_CISS, &ciss_pkg_name);
+ if (!ciss_pkg_name) {
+ warn("ciss_pkg_name is NULL");
+ ret = -1;
+ goto EXIT;
+ }
+
+ if (app_control_set_app_id(app_control, ciss_pkg_name) != APP_CONTROL_ERROR_NONE) {
warn("app_control_set_app_id() is failed");
} else if (app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT) != APP_CONTROL_ERROR_NONE) {
warn("app_control_set_operation() is failed");
warn("app_control_add_extra_data() is failed");
} else if (app_control_send_launch_request(app_control, NULL, NULL) != APP_CONTROL_ERROR_NONE) {
warn("app_control_send_launch_request() is failed");
- free(sim_slot_id_string);
- app_control_destroy(app_control);
- return -1;
+ ret = -1;
}
- free(sim_slot_id_string);
- app_control_destroy(app_control);
+EXIT:
+ if (sim_slot_id_string)
+ free(sim_slot_id_string);
+ if (app_control)
+ app_control_destroy(app_control);
+ if (ciss_pkg_name)
+ g_free(ciss_pkg_name);
- return 0;
+ return ret;
}
int _callmgr_util_check_blocking_number(const char *number, gboolean *is_blocked)
*pkg_name = g_strdup("/usr/bin/cloud-pdm-server");
break;
+ case CM_UTIL_PKG_ID_CISS:
+ *pkg_name = g_strdup("org.tizen.ciss");
+ break;
+
case CM_UTIL_PKG_ID_INVALID_E:
default:
err("Unhandled pkg id type!");
*pkg_name = g_strdup("/usr/bin/cloud-pdm-server");;
break;
+ case CM_UTIL_PKG_ID_CISS:
+ *pkg_name = g_strdup("org.tizen.w-ciss");
+ break;
+
case CM_UTIL_PKG_ID_INVALID_E:
default:
err("Unhandled pkg idtype!");