From: Youngjae Cho Date: Tue, 27 Oct 2020 06:05:03 +0000 (+0900) Subject: Rearrange PWROFF_FLAG flag setting X-Git-Tag: accepted/tizen/6.0/unified/20201110.230811~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8768b01a896da204957a86071cc07b3494476297;p=platform%2Fcore%2Fsystem%2Fdeviced.git Rearrange PWROFF_FLAG flag setting Set PWROFF_FLAG when the poweroff enters POWEROFF_TRIGGERED stage. Change-Id: I4129f654792e6ad090774cbc46e0f5a64692e64a Signed-off-by: Youngjae Cho --- diff --git a/plugins/iot/display/key-filter.c b/plugins/iot/display/key-filter.c index 11821a6..bc9d0dd 100644 --- a/plugins/iot/display/key-filter.c +++ b/plugins/iot/display/key-filter.c @@ -122,7 +122,6 @@ static void pwroff_popup(void) { int ret; - clear_pm_status_flag(PWROFF_FLAG); ret = launch_system_app(APP_POWERKEY, 2, APP_KEY_TYPE, APP_POWERKEY); if (ret < 0) _E("Failed to launch power off popup."); diff --git a/plugins/mobile/display/key-filter.c b/plugins/mobile/display/key-filter.c index 7998b16..7a57a98 100644 --- a/plugins/mobile/display/key-filter.c +++ b/plugins/mobile/display/key-filter.c @@ -138,7 +138,6 @@ static void longkey_pressed(void) _D("No poweroff capability!"); return; } - clear_pm_status_flag(PWROFF_FLAG); } static gboolean longkey_restore_cb(void *data) diff --git a/plugins/tv/display/key-filter.c b/plugins/tv/display/key-filter.c index b28d7ec..68fcf78 100644 --- a/plugins/tv/display/key-filter.c +++ b/plugins/tv/display/key-filter.c @@ -122,7 +122,6 @@ static void pwroff_popup(void) { int ret; - clear_pm_status_flag(PWROFF_FLAG); ret = launch_system_app(APP_POWERKEY, 2, APP_KEY_TYPE, APP_POWERKEY); if (ret < 0) _E("Failed to launch power off popup."); diff --git a/plugins/wearable/display/key-filter.c b/plugins/wearable/display/key-filter.c index 32691f8..cdea506 100644 --- a/plugins/wearable/display/key-filter.c +++ b/plugins/wearable/display/key-filter.c @@ -138,7 +138,6 @@ static void longkey_pressed(void) _D("No poweroff capability!"); return; } - clear_pm_status_flag(PWROFF_FLAG); } static gboolean longkey_restore_cb(void *data) diff --git a/src/power/power-handler.c b/src/power/power-handler.c index 8b6684f..693c4a4 100644 --- a/src/power/power-handler.c +++ b/src/power/power-handler.c @@ -356,9 +356,6 @@ static gboolean poweroff_wait_timeout_cb(void *data) poweroff_prepare(); poweroff_request_shutdown(); - - if (disp_plgn->update_pm_setting) - disp_plgn->update_pm_setting(SETTING_POWEROFF, poweroff_opt.type); } else { _D("Poweroff wait timer for pid %d is expired, but keep waiting for others...", pid); } @@ -510,6 +507,8 @@ static int power_execute_pid(const char *typename, const char *option) _E("Failed to set vconf value for power off status: %d", vconf_get_ext_errno()); poweroff_stage = POWEROFF_TRIGGERED; + if (disp_plgn->update_pm_setting) + disp_plgn->update_pm_setting(SETTING_POWEROFF, poweroff_opt.type); /* Poweroff event broadcasting */ system_shutdown_send_system_event();