Change-Id: I96fe552053fe04ea5b4f3613e80fcdfb457219cd
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
shared_ptr<AbstractAction>* ptr =
static_cast<shared_ptr<AbstractAction>*>(handle);
AppControlAction* action = static_cast<AppControlAction*>(ptr->get());
- *app_control = action->GetAppControl();
+
+ app_control_h clone;
+ int r = app_control_clone(&clone, action->GetAppControl());
+ if (r != APP_CONTROL_ERROR_NONE) {
+ LOGE("failed to create a app_control handle : %d", r);
+ return NOTI_EX_ERROR_INVALID_PARAMETER;
+ }
+
+ *app_control = clone;
return NOTI_EX_ERROR_NONE;
}