From: Woochanlee Date: Wed, 7 Jul 2021 10:06:24 +0000 (+0900) Subject: bootstrap: Code and logic clean up when display off state X-Git-Tag: submit/tizen/20210708.061620~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F260952%2F6;p=platform%2Fcore%2Fuifw%2Faurum.git bootstrap: Code and logic clean up when display off state there is no need to call device_power_wakeup(), if display already on Change-Id: Ic42d9625cf04b0a1ffec79652c4c8a5fb0d363e3 --- diff --git a/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc index b291289..82d10d5 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc @@ -15,22 +15,26 @@ PreCommand::PreCommand(Command *cmd) : mCommand{cmd} {} ::grpc::Status PreCommand::execute() { - { - LOGI("PreCommand --------------- "); - display_state_e state; - if (device_display_get_state(&state) != DEVICE_ERROR_NONE) { - LOGI("getting display state has failed"); - } +#ifndef TIZEN_TV + display_state_e state; + if (device_display_get_state(&state) != DEVICE_ERROR_NONE) { + LOGE("getting display state has failed"); + return grpc::Status::CANCELLED; + } - bool isDisplayOn = DISPLAY_STATE_SCREEN_OFF != state; + bool isDisplayOn = DISPLAY_STATE_SCREEN_OFF != state; + if (!isDisplayOn) { + LOGI("Display off state try to wake up"); if (device_power_wakeup(false) != DEVICE_ERROR_NONE) { - LOGI("turning on display has failed"); + LOGE("turning on display has failed"); + return grpc::Status::CANCELLED; } - if (!isDisplayOn) - std::this_thread::sleep_for(std::chrono::milliseconds{INTV_TURNON_MARGIN}); + std::this_thread::sleep_for(std::chrono::milliseconds{INTV_TURNON_MARGIN}); } +#endif /* TIZEN_TV */ + mCommand->executePre(); return mCommand->execute(); } diff --git a/packaging/aurum.spec b/packaging/aurum.spec index 21e21fc..f002269 100644 --- a/packaging/aurum.spec +++ b/packaging/aurum.spec @@ -131,6 +131,11 @@ meson \ -e 's%^.*: warning: .*$%\x1b[30;43m&\x1b[m%' %build + +%if "%{tizen_profile_name}" == "tv" + CFLAGS+=" -DTIZEN_TV";export CFLAGS +%endif + ninja \ -C gbsbuild \ -j %(echo "`/usr/bin/getconf _NPROCESSORS_ONLN`") \