Modify incorrect instance ID settings 46/306546/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 23 Feb 2024 00:06:54 +0000 (09:06 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 23 Feb 2024 00:06:54 +0000 (09:06 +0900)
The instance ID of the app status handle must be set only when the instance ID
of the launch context is not empty.

Change-Id: I0e8d6e5565870b34c5738074df10707786026fd2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/app_status/app_status_manager.cc

index e2e97df..7104580 100644 (file)
@@ -789,8 +789,10 @@ AppStatusPtr AppStatusManager::AddAppInfo(LaunchContext* context) {
     auto& app_status = found->second;
     if (app_status->GetUID() == context->GetTargetUid()) {
       app_status->request_id_ = context->GetRequestId();
-      app_status->instance_id_ = context->GetInstanceId();
+      if (!context->GetInstanceId().empty())
+        app_status->instance_id_ = context->GetInstanceId();
       app_status->org_caller_pid_ = context->GetCallerPid();
+      app_status->last_caller_pid_ = context->GetCallerPid();
       app_status->SetBackgroundLaunch(context->IsBackgroundLaunch());
       app_status->subapp_ = context->IsSubApp();
       app_status->debug_mode_ = context->IsDebugMode();