Removes pre resume called flag 41/177641/1
authorhyunho <hhstark.kang@samsung.com>
Wed, 2 May 2018 09:50:10 +0000 (18:50 +0900)
committerhyunho <hhstark.kang@samsung.com>
Wed, 2 May 2018 09:52:12 +0000 (18:52 +0900)
Home can be uniconified when LCD is off.
eg) 25 sec after LCD off

Change-Id: I2342396966d6149f7804b121e60ee02c909885f3
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/watch_app_main.c

index 14f32a9..a477c53 100755 (executable)
@@ -114,7 +114,6 @@ static watch_app_ambient_tick_type_e ambient_tick_type = WATCH_APP_AMBIENT_TICK_
 static watch_app_time_tick_resolution_e app_tick_type = WATCH_APP_TIME_TICKS_PER_SECOND;
 static int app_tick_resolution = 1;
 static aul_app_com_connection_h __conn_viewer_state;
-static bool __pre_resume_called = 0;
 
 struct app_event_handler {
        app_event_type_e type;
@@ -605,9 +604,6 @@ static int __on_pause(void *data)
                return APP_ERROR_NONE;
        }
 
-       /* clear pre resume flag */
-       __pre_resume_called = 0;
-
        /* Handling the ambient mode */
        if (__context.ambient_mode)
                __context.ambient_mode_skip_resume = 1;
@@ -856,11 +852,9 @@ static int __viewer_state_handler(const char *widget_id, aul_app_com_result_e e,
                __on_resume(NULL);
        } else if (*state == AUL_SCREEN_STATUS_PAUSE) {
                __on_pause(NULL);
-       } else if (*state == AUL_SCREEN_STATUS_PRE_RESUME
-                       && __pre_resume_called == 0) {
+       } else if (*state == AUL_SCREEN_STATUS_PRE_RESUME) {
                _D("call pre resume tick");
                __on_pre_resume(NULL);
-               __pre_resume_called = 1;
        }
 
        if (timeinfo.timezone)
@@ -871,11 +865,8 @@ static int __viewer_state_handler(const char *widget_id, aul_app_com_result_e e,
 
 static void __lcd_on_handler(void *user_data)
 {
-       if (__pre_resume_called == 0) {
-               _D("Call pre resume tick");
-               __on_pre_resume(NULL);
-               __pre_resume_called = 1;
-       }
+       _D("Call pre resume tick");
+       __on_pre_resume(NULL);
 }
 
 EXPORT_API int watch_app_main(int argc, char **argv,