The operation of the display_state_set_current() is interfered by
the existing operation display_state_transition_do_state_transition().
As both are accessing and modifying same underlying data, and they
can be working at the same time, the data could be corrupted by each
other during their operation. Therefore, use only one for set state.
However, all of them should be fixed to display_state_set_current()
eventually.
Change-Id: I635eb5e8537302647d120ca4f6ef005f09dc1a07
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
#include "shared/common.h"
#include "display-state-transition.h"
#include "display-backlight.h"
+#include "device-interface.h"
typedef union {
int32_t i32;
enum deviced_display_state state = *(enum deviced_display_state *) data1;
enum deviced_event event = *(enum deviced_event *) data2;
- return display_state_set_current(state, event);
+ /**
+ * FIXME: Need to change it to display_state_set_current()
+ */
+ if (event == DEVICED_EVENT_DISPLAY_SCREEN_TIMEOUT)
+ return display_state_transition_do_state_transition(state, EVENT_TIMEOUT);
+ else
+ return display_state_transition_do_state_transition(state, EVENT_INPUT);
}
default:
return -EINVAL;