Fix SleepSupport 62/213862/2 accepted/tizen/unified/20190916.111603 submit/tizen/20190916.054022
authorHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 16 Sep 2019 03:10:08 +0000 (12:10 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 16 Sep 2019 05:24:29 +0000 (14:24 +0900)
Change-Id: Ic44b710acb3fe4a19238933c0b32e67bbca13387
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
plugins/iot/display/core.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/wearable/display/core.c

index 9850915..18786fa 100644 (file)
@@ -938,6 +938,9 @@ void reset_timeout(int timeout)
        if (!display_conf.timeout_enable)
                return;
 
+       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+               return;
+
        _I("Reset timeout(%d ms).", timeout);
        if (timeout_src_id != 0) {
                g_source_remove(timeout_src_id);
@@ -1893,6 +1896,9 @@ static int default_trans(int evt)
                        /* enter next state directly */
                        states[pm_cur_state].trans(EVENT_TIMEOUT);
                } else {
+                       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+                               return 0;
+
                        st->action(st->timeout);
                }
        }
@@ -1969,7 +1975,7 @@ static int default_action(int timeout)
                return -EINVAL;
        }
 
-       if (pm_cur_state != S_SLEEP && !(pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)) {
+       if (pm_cur_state != S_SLEEP) {
                if (pm_cur_state == S_NORMAL &&
                    lcdon_tv.tv_sec != 0) {
                        gettimeofday(&now_tv, NULL);
index 4a54229..c7054a2 100644 (file)
@@ -946,6 +946,9 @@ void reset_timeout(int timeout)
        if (!display_conf.timeout_enable)
                return;
 
+       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+               return;
+
        _I("Reset timeout(%d ms).", timeout);
        if (timeout_src_id != 0) {
                g_source_remove(timeout_src_id);
@@ -1905,6 +1908,9 @@ static int default_trans(int evt)
                        /* enter next state directly */
                        states[pm_cur_state].trans(EVENT_TIMEOUT);
                } else {
+                       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+                               return 0;
+
                        st->action(st->timeout);
                }
        }
@@ -1981,7 +1987,7 @@ static int default_action(int timeout)
                return -EINVAL;
        }
 
-       if (pm_cur_state != S_SLEEP && !(pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)) {
+       if (pm_cur_state != S_SLEEP) {
                if (pm_cur_state == S_NORMAL &&
                    lcdon_tv.tv_sec != 0) {
                        gettimeofday(&now_tv, NULL);
index 4730754..dde0f6b 100644 (file)
@@ -938,7 +938,10 @@ void reset_timeout(int timeout)
        if (!display_conf.timeout_enable)
                return;
 
-       _I("Reset timeout(%d ms).", timeout);
+       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+               return;
+
+       _I("Reset timeout(%d ms) pm_cur_state(%d).", timeout, pm_cur_state);
        if (timeout_src_id != 0) {
                g_source_remove(timeout_src_id);
                timeout_src_id = 0;
@@ -1893,6 +1896,9 @@ static int default_trans(int evt)
                        /* enter next state directly */
                        states[pm_cur_state].trans(EVENT_TIMEOUT);
                } else {
+                       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+                               return 0;
+
                        st->action(st->timeout);
                }
        }
@@ -1969,7 +1975,7 @@ static int default_action(int timeout)
                return -EINVAL;
        }
 
-       if (pm_cur_state != S_SLEEP && !(pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)) {
+       if (pm_cur_state != S_SLEEP) {
                if (pm_cur_state == S_NORMAL &&
                    lcdon_tv.tv_sec != 0) {
                        gettimeofday(&now_tv, NULL);
index c098a56..60cb553 100644 (file)
@@ -945,6 +945,9 @@ void reset_timeout(int timeout)
        if (!display_conf.timeout_enable)
                return;
 
+       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+               return;
+
        _I("Reset timeout(%d ms).", timeout);
        if (timeout_src_id != 0) {
                g_source_remove(timeout_src_id);
@@ -1915,6 +1918,9 @@ static int default_trans(int evt)
                        /* enter next state directly */
                        states[pm_cur_state].trans(EVENT_TIMEOUT);
                } else {
+                       if (pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)
+                               return 0;
+
                        st->action(st->timeout);
                }
        }
@@ -1991,7 +1997,7 @@ static int default_action(int timeout)
                return -EINVAL;
        }
 
-       if (pm_cur_state != S_SLEEP && !(pm_cur_state == S_LCDOFF && display_conf.sleep_support == false)) {
+       if (pm_cur_state != S_SLEEP) {
                if (pm_cur_state == S_NORMAL &&
                    lcdon_tv.tv_sec != 0) {
                        gettimeofday(&now_tv, NULL);