e_service_launcher/swl: fixed getting wrong ec and cleaning callee improperly 43/216143/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Mon, 21 Oct 2019 09:08:01 +0000 (18:08 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Mon, 21 Oct 2019 09:22:03 +0000 (18:22 +0900)
Change-Id: I58cd0e6def54e4b3b26349e63f13d6422563489b
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/services/e_service_launcher.c

index 5679edf664f127b7715cb27c9d327063148d6f78..e0435006d3fcb81adb39be3bcf28e0cdd1b36615 100644 (file)
@@ -1095,6 +1095,7 @@ _launcher_handler_rsm_provider_client_find(E_Client *rsm_consumer_ec)
 {
    E_Client *prov_ec = NULL;
    Eina_List *tzrs_provs, *l;
+   E_Service_Launcher *lc;
 
    if (!rsm_consumer_ec->remote_surface.consumer) return NULL;
 
@@ -1108,6 +1109,8 @@ _launcher_handler_rsm_provider_client_find(E_Client *rsm_consumer_ec)
         if (prov_ec->visible) continue;
         if (evas_object_visible_get(prov_ec->frame)) continue;
         if (prov_ec->comp_data->mapped) continue;
+        if (!(lc = _launcher_handler_launcher_find(prov_ec))) continue;
+        if (!lc->launched_ec) continue;
 
         ELOGF("LAUNCHER_SRV", "Found prov_ec:%p", rsm_consumer_ec, prov_ec);
         break;
@@ -1887,9 +1890,23 @@ e_service_launcher_release_shared_widget_launch(E_Client *ec)
      {
         if (runner->with_swl)
           {
-             //caller is gone before replying prepare_done
+             //callee is gone before replying prepare_done
              if (runner->state == LAUNCHER_STATE_WAIT_RESPONSE_FROM_CALLEE)
-               _launcher_data_reset(runner);
+               {
+                  if (runner->direction == TWS_SERVICE_LAUNCHER_DIRECTION_FORWARD)
+                    _launcher_post_forward(runner, EINA_FALSE);
+                  else if (runner->direction == TWS_SERVICE_LAUNCHER_DIRECTION_BACKWARD)
+                    _launcher_post_backward(runner, EINA_FALSE);
+
+                  _launcher_state_set(runner, LAUNCHER_STATE_IDLE);
+                  _launcher_launched_ec_set(runner, NULL);
+
+                  _launcher_handler_launcher_runner_unset(runner);
+                  _launcher_handler_launcher_pre_runner_unset(runner);
+
+                  runner->direction = 0;
+                  runner->with_swl = 0;
+               }
           }
      }
 }