Modify handling rpc-port request
[platform/core/appfw/app-core.git] / 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();
   }
 }