Go to watch on screenoff if there's no reserved app 16/130816/1
authorjunkyu han <junkyu.han@samsung.com>
Wed, 24 May 2017 05:51:33 +0000 (14:51 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Wed, 24 May 2017 05:51:33 +0000 (14:51 +0900)
Change-Id: I3c4e19aa72c7dbab025d9511322087bc507149cb

src/wearable/starter.c

index cf794c0..7d20894 100755 (executable)
@@ -101,6 +101,13 @@ static int _change_sequence_cb(status_active_key_e key, void *data)
 
 
 
+static Eina_Bool _go_to_watch_after_screenoff_cb(void *data)
+{
+       home_mgr_launch_home_by_power("powerkey_unfocused");
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
 static void _on_lcd_changed_receive(void *data, DBusMessage *msg)
 {
        int lcd_on = 0;
@@ -117,6 +124,9 @@ static void _on_lcd_changed_receive(void *data, DBusMessage *msg)
        } else if (lcd_off) {
                _W("LCD off");
                s_starter.lcd_status = 0;
+               if (!ecore_timer_add(20, _go_to_watch_after_screenoff_cb, NULL)) {
+                       _E("Falied to add timer for launching watch face after screenoff");
+               }
        } else {
                _E("%s dbus_message_is_signal error", DEVICED_INTERFACE_DISPLAY);
        }