*/
#include <errno.h>
+#include "display-misc.h"
#include "display-plugin.h"
#include "shared/log-macro.h"
}
return -EOPNOTSUPP;
+}
+
+int display_plugin_set_dim_state(bool on)
+{
+ if (g_display_plugin.set_dim_state) {
+ g_display_plugin.set_dim_state(on);
+ return 0;
+ }
+
+ return -EOPNOTSUPP;
+}
+
+int display_plugin_get_device_flags(unsigned long *device_flags)
+{
+ if (!device_flags)
+ return -EINVAL;
+
+ if (g_display_plugin.get_device_flags)
+ return g_display_plugin.get_device_flags(device_flags);
+
+ *device_flags = NORMAL_MODE;
+ bool lcd_paneloff_mode = false;
+ bool stay_touchscreen_off = false;
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
+ display_misc_get_stay_touchscreen_off(&stay_touchscreen_off);
+
+ if (lcd_paneloff_mode)
+ *device_flags |= LCD_PANEL_OFF_MODE;
+
+ if (stay_touchscreen_off)
+ *device_flags |= TOUCH_SCREEN_OFF_MODE;
+
+ return 0;
}
\ No newline at end of file