default_trans() was used for display state transition.
1. It gets next display state and checks if the state transition is possible or not.
2. And then, it updates old/current display state.
3. Finally, it goes to next state transition or default_action if possible.
These functions are added below display-state-transition.
- int display_state_transition_do_state_transition(enum state_t state, int evt_type);
-> This replaces default_trans()
- bool display_state_transition_is_display_state_support_transition(enum state_t state);
-> This function checks if state is support to do state transition related job.
For example,
1. checking state transition condition
2. do state transition
3. do state action
To check these, this function is added.
Change-Id: Icc58965838e30fde2871c1c69596ffbed43e60f2
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
static bool touch_blocked = false;
/* default transition, action fuctions */
-static int default_trans(int evt);
static int default_action(int timeout);
static int default_proc_change_state(unsigned int cond, pid_t pid);
static struct state states[S_END] = {
{ S_START, "S_START", NULL, NULL, NULL, NULL },
- { S_NORMAL, "S_NORMAL", default_trans, default_action, NULL, NULL },
- { S_LCDDIM, "S_LCDDIM", default_trans, default_action, NULL, NULL },
- { S_LCDOFF, "S_LCDOFF", default_trans, default_action, NULL, NULL },
+ { S_NORMAL, "S_NORMAL", NULL, default_action, NULL, NULL },
+ { S_LCDDIM, "S_LCDDIM", NULL, default_action, NULL, NULL },
+ { S_LCDOFF, "S_LCDOFF", NULL, default_action, NULL, NULL },
{ S_STANDBY, "S_STANDBY", NULL, NULL, NULL, NULL },
- { S_SLEEP, "S_SLEEP", default_trans, default_action, NULL, NULL },
+ { S_SLEEP, "S_SLEEP", NULL, default_action, NULL, NULL },
{ S_POWEROFF, "S_POWEROFF", NULL, NULL, NULL, NULL },
};
}
if (!display_state_transition_is_there_state_transition_timer())
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
return 0;
}
pm_save_logdump();
}
-/*
- * default transition function
- * 1. call check
- * 2. transition
- * 3. call enter action function
- */
-static int default_trans(int evt)
-{
- struct state *st = &states[get_pm_cur_state()];
- enum state_t next_state;
- int ret = 0;
-
- display_state_transition_get_next_transition_display_state(get_pm_cur_state(), &next_state, evt);
-
- /* check conditions */
- ret = display_state_transition_check_state_transition_condition(get_pm_cur_state(), next_state);
- if (ret < 0) {
- /* There is a condition. */
- _I("%s locked. Trans to %s failed.", states[get_pm_cur_state()].name,
- states[next_state].name);
- return -1;
- }
-
- /* state transition */
- set_pm_old_state(get_pm_cur_state());
- set_pm_cur_state(next_state);
- st = &states[get_pm_cur_state()];
-
- /* enter action */
- if (st->action) {
- if (get_pm_cur_state() == S_LCDOFF)
- display_state_transition_update_lcdoff_reason(VCONFKEY_PM_LCDOFF_BY_TIMEOUT);
-
- if ((get_pm_cur_state() == S_NORMAL) || (get_pm_cur_state() == S_LCDOFF))
- if (set_custom_lcdon_timeout(0) == true)
- display_state_transition_update_display_state_timeout_by_priority();
-
- if (display_state_transition_is_possible_to_go_lcdoff()) {
- /* enter next state directly */
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
- } else {
- if ((get_pm_cur_state() == S_SLEEP)
- && (is_emulator() == true || timeout_sleep_support == false))
- return 0;
-
- st->action(st->timeout);
- }
- }
-
- return 0;
-}
-
static gboolean lcd_on_expired(void *data)
{
int lock_state, ret;
go_lcd_off:
if (!pm_get_power_lock_support()) {
/* Resume !! */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
}
return 0;
}
if ((last_t != now) ||
(get_pm_cur_state() == S_LCDOFF) ||
(get_pm_cur_state() == S_SLEEP)) {
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
last_t = now;
}
}
switch (key_idx) {
case SETTING_TO_NORMAL:
display_state_transition_update_display_state_timeout_by_priority();
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOW_BATT:
if (display_misc_is_low_battery_state(val)) {
stop_lock_timer();
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOCK_SCREEN_BG:
set_lock_screen_bg_state(val);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_POWER_CUSTOM_BRIGHTNESS:
if (val == VCONFKEY_PM_CUSTOM_BRIGHTNESS_ON)
/* Apply new backlight time */
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
if (holdkey_block) {
display_lock_set_custom_holdkey_block(true);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
}
static int delayed_init_done(void *data)
system_wakeup_flag = true;
if (check_wakeup_src() == EVENT_DEVICE)
/* system waked up by devices */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
else
/* system waked up by user input */
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
return 0;
}
static bool touch_blocked = false;
/* default transition, action fuctions */
-static int default_trans(int evt);
static int default_action(int timeout);
static int default_proc_change_state(unsigned int cond, pid_t pid);
static struct state states[S_END] = {
{ S_START, "S_START", NULL, NULL, NULL, NULL },
- { S_NORMAL, "S_NORMAL", default_trans, default_action, NULL, NULL },
- { S_LCDDIM, "S_LCDDIM", default_trans, default_action, NULL, NULL },
- { S_LCDOFF, "S_LCDOFF", default_trans, default_action, NULL, NULL },
+ { S_NORMAL, "S_NORMAL", NULL, default_action, NULL, NULL },
+ { S_LCDDIM, "S_LCDDIM", NULL, default_action, NULL, NULL },
+ { S_LCDOFF, "S_LCDOFF", NULL, default_action, NULL, NULL },
{ S_STANDBY, "S_STANDBY", NULL, NULL, NULL, NULL },
- { S_SLEEP, "S_SLEEP", default_trans, default_action, NULL, NULL },
+ { S_SLEEP, "S_SLEEP", NULL, default_action, NULL, NULL },
{ S_POWEROFF, "S_POWEROFF", NULL, NULL, NULL, NULL },
};
}
if (!display_state_transition_is_there_state_transition_timer())
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
return 0;
}
pm_save_logdump();
}
-/*
- * default transition function
- * 1. call check
- * 2. transition
- * 3. call enter action function
- */
-static int default_trans(int evt)
-{
- struct state *st = &states[get_pm_cur_state()];
- enum state_t next_state;
- int ret = 0;
-
- display_state_transition_get_next_transition_display_state(get_pm_cur_state(), &next_state, evt);
-
- /* check conditions */
- ret = display_state_transition_check_state_transition_condition(get_pm_cur_state(), next_state);
- if (ret < 0) {
- /* There is a condition. */
- _I("%s locked. Trans to %s failed.", states[get_pm_cur_state()].name,
- states[next_state].name);
- return -1;
- }
-
- /* state transition */
- set_pm_old_state(get_pm_cur_state());
- set_pm_cur_state(next_state);
- st = &states[get_pm_cur_state()];
-
- /* enter action */
- if (st->action) {
- if (get_pm_cur_state() == S_LCDOFF)
- display_state_transition_update_lcdoff_reason(VCONFKEY_PM_LCDOFF_BY_TIMEOUT);
-
- if ((get_pm_cur_state() == S_NORMAL) || (get_pm_cur_state() == S_LCDOFF))
- if (set_custom_lcdon_timeout(0) == true)
- display_state_transition_update_display_state_timeout_by_priority();
-
- if (display_state_transition_is_possible_to_go_lcdoff()) {
- /* enter next state directly */
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
- } else {
- if ((get_pm_cur_state() == S_SLEEP)
- && (is_emulator() == true || timeout_sleep_support == false))
- return 0;
-
- st->action(st->timeout);
- }
- }
-
- return 0;
-}
-
static gboolean lcd_on_expired(void *data)
{
int lock_state, ret;
go_lcd_off:
if (!pm_get_power_lock_support()) {
/* Resume !! */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
}
return 0;
}
if ((last_t != now) ||
(get_pm_cur_state() == S_LCDOFF) ||
(get_pm_cur_state() == S_SLEEP)) {
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
last_t = now;
}
}
switch (key_idx) {
case SETTING_TO_NORMAL:
display_state_transition_update_display_state_timeout_by_priority();
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOW_BATT:
if (display_misc_is_low_battery_state(val)) {
stop_lock_timer();
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOCK_SCREEN_BG:
set_lock_screen_bg_state(val);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_POWER_CUSTOM_BRIGHTNESS:
if (val == VCONFKEY_PM_CUSTOM_BRIGHTNESS_ON)
/* Apply new backlight time */
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
if (holdkey_block) {
display_lock_set_custom_holdkey_block(true);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
}
static int delayed_init_done(void *data)
system_wakeup_flag = true;
if (check_wakeup_src() == EVENT_DEVICE)
/* system waked up by devices */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
else
/* system waked up by user input */
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
return 0;
}
static bool touch_blocked = false;
/* default transition, action fuctions */
-static int default_trans(int evt);
static int default_action(int timeout);
static int default_proc_change_state(unsigned int cond, pid_t pid);
static struct state states[S_END] = {
{ S_START, "S_START", NULL, NULL, NULL, NULL },
- { S_NORMAL, "S_NORMAL", default_trans, default_action, NULL, NULL },
- { S_LCDDIM, "S_LCDDIM", default_trans, default_action, NULL, NULL },
- { S_LCDOFF, "S_LCDOFF", default_trans, default_action, NULL, NULL },
+ { S_NORMAL, "S_NORMAL", NULL, default_action, NULL, NULL },
+ { S_LCDDIM, "S_LCDDIM", NULL, default_action, NULL, NULL },
+ { S_LCDOFF, "S_LCDOFF", NULL, default_action, NULL, NULL },
{ S_STANDBY, "S_STANDBY", NULL, NULL, NULL, NULL },
- { S_SLEEP, "S_SLEEP", default_trans, default_action, NULL, NULL },
+ { S_SLEEP, "S_SLEEP", NULL, default_action, NULL, NULL },
{ S_POWEROFF, "S_POWEROFF", NULL, NULL, NULL, NULL },
};
}
if (!display_state_transition_is_there_state_transition_timer())
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
return 0;
}
pm_save_logdump();
}
-/*
- * default transition function
- * 1. call check
- * 2. transition
- * 3. call enter action function
- */
-static int default_trans(int evt)
-{
- struct state *st = &states[get_pm_cur_state()];
- enum state_t next_state;
- int ret = 0;
-
- display_state_transition_get_next_transition_display_state(get_pm_cur_state(), &next_state, evt);
-
- /* check conditions */
- ret = display_state_transition_check_state_transition_condition(get_pm_cur_state(), next_state);
- if (ret < 0) {
- /* There is a condition. */
- _I("%s locked. Trans to %s failed.", states[get_pm_cur_state()].name,
- states[next_state].name);
- return -1;
- }
-
- /* state transition */
- set_pm_old_state(get_pm_cur_state());
- set_pm_cur_state(next_state);
- st = &states[get_pm_cur_state()];
-
- /* enter action */
- if (st->action) {
- if (get_pm_cur_state() == S_LCDOFF)
- display_state_transition_update_lcdoff_reason(VCONFKEY_PM_LCDOFF_BY_TIMEOUT);
-
- if ((get_pm_cur_state() == S_NORMAL) || (get_pm_cur_state() == S_LCDOFF))
- if (set_custom_lcdon_timeout(0) == true)
- display_state_transition_update_display_state_timeout_by_priority();
-
- if (display_state_transition_is_possible_to_go_lcdoff()) {
- /* enter next state directly */
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
- } else {
- if ((get_pm_cur_state() == S_SLEEP)
- && (is_emulator() == true || timeout_sleep_support == false))
- return 0;
-
- st->action(st->timeout);
- }
- }
-
- return 0;
-}
-
static gboolean lcd_on_expired(void *data)
{
int lock_state, ret;
go_lcd_off:
if (!pm_get_power_lock_support()) {
/* Resume !! */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
}
return 0;
}
if ((last_t != now) ||
(get_pm_cur_state() == S_LCDOFF) ||
(get_pm_cur_state() == S_SLEEP)) {
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
last_t = now;
}
}
switch (key_idx) {
case SETTING_TO_NORMAL:
display_state_transition_update_display_state_timeout_by_priority();
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOW_BATT:
if (display_misc_is_low_battery_state(val)) {
stop_lock_timer();
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_LOCK_SCREEN_BG:
set_lock_screen_bg_state(val);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
break;
case SETTING_POWER_CUSTOM_BRIGHTNESS:
if (val == VCONFKEY_PM_CUSTOM_BRIGHTNESS_ON)
/* Apply new backlight time */
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
if (holdkey_block) {
display_lock_set_custom_holdkey_block(true);
display_state_transition_update_display_state_timeout_by_priority();
if (get_pm_cur_state() == S_NORMAL)
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
}
static int delayed_init_done(void *data)
system_wakeup_flag = true;
if (check_wakeup_src() == EVENT_DEVICE)
/* system waked up by devices */
- states[get_pm_cur_state()].trans(EVENT_DEVICE);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_DEVICE);
else
/* system waked up by user input */
- states[get_pm_cur_state()].trans(EVENT_INPUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_INPUT);
return 0;
}
* 2. Released lock is one of the pm_cur_state's lock
* This emulates already expired transition timer */
if (!display_state_transition_is_there_state_transition_timer() && (get_pm_cur_state() == state))
- display_plugin_state_do_default_trans(get_pm_cur_state(), EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
if (state == S_LCDOFF)
set_process_active(false, pid);
return -EOPNOTSUPP;
}
+/* FIXME: default_action/default_trans naming should be changed after state transition functions are relocated */
+bool display_plugin_state_is_there_default_action(enum state_t state)
+{
+ if (g_display_plugin.display_states[state] && g_display_plugin.display_states[state]->action)
+ return true;
+
+ return false;
+}
+
int display_plugin_state_get_name(enum state_t state, const char **state_name)
{
if (!state_name)
int display_plugin_state_do_default_trans(enum state_t state, int evt);
bool display_plugin_state_is_there_default_trans(enum state_t state);
int display_plugin_state_do_default_action(enum state_t state, int timeout);
+bool display_plugin_state_is_there_default_action(enum state_t state);
int display_plugin_state_get_name(enum state_t state, const char **state_name);
int display_plugin_state_set_timeout(enum state_t state, int state_timeout);
int display_plugin_state_get_timeout(enum state_t state, int *state_timeout);
remove_state_transition();
- display_plugin_state_do_default_trans(get_pm_cur_state(), EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
return G_SOURCE_REMOVE;
}
state_transition_timer_id = g_timeout_add(timeout,
state_transition_timeout_handler, NULL);
else if (timeout == 0)
- display_plugin_state_do_default_trans(get_pm_cur_state(), EVENT_TIMEOUT);
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
return 0;
}
_I("Normal: DIM timeout is set by %d ms", dim_state_timeout);
}
-static bool is_display_state_valid_for_transition(enum state_t state)
+bool display_state_transition_is_display_state_support_transition(enum state_t state)
{
switch(state) {
case S_NORMAL:
{
int trans_cond;
- if (!is_display_state_valid_for_transition(cur_state))
+ if (!display_state_transition_is_display_state_support_transition(cur_state))
return -EPERM;
makeup_trans_condition();
_E("Failed to set vconf value for lcd off source: %d", vconf_get_ext_errno());
return -EPERM;
}
-
return 0;
}
_D("Goto LCDOFF direct: lock(%d) hdmi(%d) cradle(%d).", lock, hdmi_state, cradle);
return true;
+}
+
+/* FXIME: enter action logic should be discussed and considered about better logic */
+/*
+ * default transition function
+ * 1. call check
+ * 2. transition
+ * 3. call enter action function
+ */
+int display_state_transition_do_state_transition(enum state_t state, int evt_type)
+{
+ const char* current_state_name = NULL;
+ const char* next_state_name = NULL;
+ enum state_t next_state;
+ int ret = 0;
+ int timeout = 0;
+
+ if (!display_state_transition_is_display_state_support_transition(state))
+ return -EPERM;
+
+ if (display_plugin_state_is_there_default_trans(state))
+ return display_plugin_state_do_default_trans(state, evt_type);
+
+ display_state_transition_get_next_transition_display_state(get_pm_cur_state(), &next_state, evt_type);
+
+ /* check conditions */
+ ret = display_state_transition_check_state_transition_condition(get_pm_cur_state(), next_state);
+ if (ret < 0) {
+ display_plugin_state_get_name(get_pm_cur_state(), ¤t_state_name);
+ display_plugin_state_get_name(next_state, &next_state_name);
+ /* There is a condition. */
+ _I("%s locked. Trans to %s failed.", current_state_name, next_state_name);
+ return -EPERM;
+ }
+
+ /* state transition */
+ set_pm_old_state(get_pm_cur_state());
+ set_pm_cur_state(next_state);
+
+ /* enter action */
+ if (display_plugin_state_is_there_default_action(get_pm_cur_state())) {
+ if (get_pm_cur_state() == S_LCDOFF)
+ display_state_transition_update_lcdoff_reason(VCONFKEY_PM_LCDOFF_BY_TIMEOUT);
+
+ if ((get_pm_cur_state() == S_NORMAL) || (get_pm_cur_state() == S_LCDOFF))
+ if (set_custom_lcdon_timeout(0) == true)
+ display_state_transition_update_display_state_timeout_by_priority();
+
+ if (display_state_transition_is_possible_to_go_lcdoff()) {
+ /* enter next state directly */
+ display_state_transition_do_state_transition(get_pm_cur_state(), EVENT_TIMEOUT);
+ } else {
+ if ((get_pm_cur_state() == S_SLEEP) &&
+ (is_emulator() == true || timeout_sleep_support == false))
+ return 0;
+
+ display_plugin_state_get_timeout(get_pm_cur_state(), &timeout);
+ display_plugin_state_do_default_action(get_pm_cur_state(), timeout);
+ }
+ }
+ return 0;
}
\ No newline at end of file
int display_state_transition_check_state_transition_condition(enum state_t cur_state, enum state_t next_state);
int display_state_transition_update_lcdoff_reason(int source);
bool display_state_transition_is_possible_to_go_lcdoff(void);
+int display_state_transition_do_state_transition(enum state_t state, int evt_type);
+bool display_state_transition_is_display_state_support_transition(enum state_t state);
#endif /* __DISPLAY_STATE_TRANSITION_H__ */
\ No newline at end of file
#include "poll.h"
#include "display-ops.h"
#include "display-plugin.h"
+#include "display-state-transition.h"
#include "shared/plugin.h"
static PMMsg recv_data;
if (cond < 0)
return cond;
- if (!display_plugin_state_is_there_default_trans(cond))
+ if (!display_state_transition_is_display_state_support_transition(cond))
return -ENOTSUP;
cond = SET_COND_REQUEST(cond, PM_REQUEST_LOCK);
if (cond < 0)
return cond;
- if (!display_plugin_state_is_there_default_trans(cond))
+ if (!display_state_transition_is_display_state_support_transition(cond))
return -ENOTSUP;
cond = SET_COND_REQUEST(cond, PM_REQUEST_UNLOCK);
return -ENOTSUP;
}
- if (!display_plugin_state_is_there_default_trans(cond))
+ if (!display_state_transition_is_display_state_support_transition(cond))
return -ENOTSUP;
cond = SET_COND_REQUEST(cond, PM_REQUEST_CHANGE);