conform: retry connect to indicator when confrom fails connect. 07/52607/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 10 Nov 2015 00:00:17 +0000 (16:00 -0800)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 17 Dec 2015 05:12:00 +0000 (21:12 -0800)
Summary:
An application starts before the indicator has. In this case,
the application should try to connect again with the indicator.

Test Plan:
1. Start an application without the indicator service.
2. Start the indicator service.

Reviewers: raster, Hermet, woohyun, jaehwan, cedric

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3258

Change-Id: I692260518b75815c4710707826190d6edaad681f
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elm_conform.c

index 761571b..2c47100 100644 (file)
@@ -426,7 +426,8 @@ _create_portrait_indicator(Evas_Object *obj)
    if (!elm_plug_connect(port_indicator, port_indicator_serv_name, 0, EINA_FALSE))
      {
         DBG("Conformant cannot connect to server[%s]\n", port_indicator_serv_name);
-        return NULL;
+        sd->port_indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME,
+                                          _port_indicator_connect_cb, obj);
      }
 
    elm_widget_sub_object_add(obj, port_indicator);
@@ -467,7 +468,8 @@ _create_landscape_indicator(Evas_Object *obj)
    if (!elm_plug_connect(land_indicator, land_indicator_serv_name, 0, EINA_FALSE))
      {
         DBG("Conformant cannot connect to server[%s]\n", land_indicator_serv_name);
-        return NULL;
+        sd->land_indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME,
+                                          _land_indicator_connect_cb, obj);
      }
 
    elm_widget_sub_object_add(obj, land_indicator);