Send Viewer pause/resume event to Watch Application. 26/183926/1 submit/tizen/20180716.160649
authorNilesh Trimbake <t.shripati@samsung.com>
Thu, 12 Jul 2018 09:41:17 +0000 (15:11 +0530)
committerNilesh Trimbake <t.shripati@samsung.com>
Thu, 12 Jul 2018 09:41:17 +0000 (15:11 +0530)
This patch send viewer pause/resume event to watch
application, to recieve clocktick event at application.

Change-Id: I12ea26642b82c88cfa822e63b14b169d1c9db499

src/home_app_manager.c

index 3fafa36a7fe55a74df19fe12e467d42f904bc7a3..3255715bbfdf54fb74b6b2904821cc00d150772f 100755 (executable)
@@ -495,6 +495,7 @@ void app_resume(void *data)
        Evas_Object *scroller = NULL;
        Evas_Object *focused_page = NULL;
        layout_info_s *layout_info = NULL;
+       int ret = 0;
        _D("Resume");
 
        if (main_info.state == APP_STATE_RESUME) {
@@ -541,6 +542,11 @@ void app_resume(void *data)
                        _home_visibility_vconf_set(EINA_TRUE);
        }
 
+       _W("resume watch application viewer state");
+       ret = watch_manager_notify_resumed_status_of_viewer();
+       if (ret < 0)
+               _E("Failed to resume watch application viewer state, error code [%d]", ret);
+
        apps_resume();
 }
 
@@ -549,6 +555,7 @@ void app_resume(void *data)
 void app_pause(void *data)
 {
        _D("Paused");
+       int ret = 0;
        if (main_info.state == APP_STATE_PAUSE) {
                _E("paused already");
                return;
@@ -565,6 +572,11 @@ void app_pause(void *data)
        /* DYNAMICBOX pause */
        _W("clock/widget paused");
        widget_viewer_evas_notify_paused_status_of_viewer();
+
+       _W("pause watch application viewer state");
+       ret = watch_manager_notify_paused_status_of_viewer();
+       if (ret < 0)
+               _E("Failed to pause watch application viewer state, error code [%d]", ret);
 }