display: Relocate display_on/off_by_reason() 28/294228/4
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 14 Jun 2023 11:08:52 +0000 (20:08 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Mon, 26 Jun 2023 05:14:30 +0000 (14:14 +0900)
commit2f68b9a15c55f8a3eac6546497995cbc51ad00c8
tree24310380a2110d69f597152a92e61975a39e9ad9
parenta4f1122937ab6530a3bb1574810ab8a134e0eeb3
display: Relocate display_on/off_by_reason()

display_on/off_by_reason() is used by dbus_changestatebyreason call.
1. Set display on/off reason to the flag.
2. Check if it is possible to go to lcd_on/off procedure.
   If possible, go to the lcd on/off procedure.
3. After that, update current, before display state and do action about S_NORMAL/S_LCDOFF.

For relocating these, the string of device operation declaration has also been moved to shared/devices.h
There is no reason for the same string to exist in all plugins.

New functions are added below display-panel.
- int display_panel_display_turn_on_by_reason(const char *reason, int timeout);
- int display_panel_display_turn_off_by_reason(const char *reason);
    -> These replace display_on/off_by_reason()

Change-Id: Ia22ee6295fa138c3742be62c3bbc2c357716caf5
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
plugins/iot-headed/display/core.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/wearable/display/core.c
src/display/core.h
src/display/display-panel.c
src/display/display-panel.h
src/display/display-plugin.c
src/display/display-plugin.h
src/display/plugin-common/display-dbus.c
src/shared/devices.h