Fix wrong implementation about AppControl call 77/273677/4
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 12 Apr 2022 07:47:26 +0000 (16:47 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Tue, 12 Apr 2022 22:17:22 +0000 (22:17 +0000)
If the bundle data has "__K_SERVICE_THREAD", the request will be
delivered to the service thread.

Change-Id: Id5fba4c8b49a561085029001c61a33f096de7f1e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
tizen-cpp/app-core-ui-cpp/app_core_ui_base.cc

index f16788b..f5b0d9b 100644 (file)
@@ -42,6 +42,8 @@
 
 namespace tizen_cpp {
 
+constexpr const char K_SERVICE_THREAD[] = "__K_SERVICE_THREAD";
+
 class AppCoreUiBase::Impl {
  public:
   Impl(AppCoreUiBase* parent, unsigned int hint)
@@ -608,9 +610,15 @@ int AppCoreUiBase::OnReceive(aul_type type, tizen_base::Bundle b) {
       impl_->state_ != Impl::AS_PAUSED)
     return 0;
 
-  if (type == AUL_START)
+  if (type == AUL_START) {
     impl_->ExitFromSuspend();
 
+    if (!b.GetString(K_SERVICE_THREAD).empty()) {
+      impl_->service_->OnReceive(type, std::move(b));
+      return 0;
+    }
+  }
+
   AppCoreBase::OnReceive(type, b);
 
   switch (type) {