From 5d4370a0852061848f773c5fb747ae0b29613281 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 2 Feb 2024 15:52:10 +0900 Subject: [PATCH] Add missing function call To use AppControlAction API, the Init() method must be called. Change-Id: Ieed41a2e529ffdcdf84662c2464d537607981147 Signed-off-by: Hwankyu Jhun --- tizen-cpp/app-core-cpp/api/app_core_base_control.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tizen-cpp/app-core-cpp/api/app_core_base_control.cc b/tizen-cpp/app-core-cpp/api/app_core_base_control.cc index 263be6d..738f2ce 100644 --- a/tizen-cpp/app-core-cpp/api/app_core_base_control.cc +++ b/tizen-cpp/app-core-cpp/api/app_core_base_control.cc @@ -29,6 +29,8 @@ API int app_core_base_control_add(const char* id, app_core_base_control_cb cb, return -EINVAL; } + if (tizen_cpp::AppControlManager::Init() != 0) return -EIO; + return tizen_cpp::AppControlManager::Add( id, [=](bundle* b) { cb(b, user_data); }, reinterpret_cast(h)); @@ -40,6 +42,8 @@ API int app_core_base_control_remove(app_core_base_control_h h) { return -EINVAL; } + if (tizen_cpp::AppControlManager::Init() != 0) return -EIO; + return tizen_cpp::AppControlManager::Remove( reinterpret_cast(h)); } -- 2.7.4