::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();
}
-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`") \