Modify handling rpc-port request 45/283345/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 25 Oct 2022 02:35:47 +0000 (02:35 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 25 Oct 2022 02:35:47 +0000 (02:35 +0000)
When getting the rpc-port request, the application core doens't unset
the background state to maintain the background status.

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

index 0cf24a8..dd2c2dc 100644 (file)
@@ -576,23 +576,21 @@ void AppCoreUiBase::Impl::DoStart(tizen_base::Bundle b) {
     return;
   }
 
+  std::string rpc_port = b.GetString(AUL_K_RPC_PORT);
   if (parent_->GetHint() & HINT_BG_LAUNCH_CONTROL) {
     std::string bg_launch = b.GetString(AUL_SVC_K_BG_LAUNCH);
     if (!bg_launch.empty() && bg_launch.compare("enable") == 0) {
       if (!bg_state_ && state_ != AS_RUNNING)
         ApplyBgState(true);
     } else {
-      if (bg_state_)
+      if (bg_state_ && rpc_port.empty())
         ApplyBgState(false);
     }
   }
 
   if (parent_->GetHint() & HINT_WINDOW_AUTO_CONTROL) {
-    if (!bg_state_) {
-      std::string rpc_port = b.GetString(AUL_K_RPC_PORT);
-      if (rpc_port.empty())
-        RaiseWin();
-    }
+    if (!bg_state_ && rpc_port.empty())
+      RaiseWin();
   }
 }