::grpc::Status PreCommand::execute()
{
-#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;
-
- if (!isDisplayOn) {
- LOGI("Display off state try to wake up");
- if (device_power_wakeup(false) != DEVICE_ERROR_NONE) {
- LOGE("turning on display has failed");
- return grpc::Status::CANCELLED;
- }
-
- std::this_thread::sleep_for(std::chrono::milliseconds{INTV_TURNON_MARGIN});
- }
-#endif /* TIZEN_TV */
-
mCommand->executePre();
return mCommand->execute();
}
%build
-%if "%{tizen_profile_name}" == "tv"
- CFLAGS+=" -DTIZEN_TV";export CFLAGS
-%endif
-
ninja \
-C gbsbuild \
-j %(echo "`/usr/bin/getconf _NPROCESSORS_ONLN`") \