#include "ambient-mode.h"
#include "util.h"
#include "core.h"
+#include "poll.h"
#include "lock-detector.h"
#include "display-ops.h"
#include "shared/devices.h"
#include "power/power-suspend.h"
#include "power/power-boot.h"
#include "power/power-doze.h"
-#include "display-dpms.h"
+#include "device-interface.h"
+#include "display-plugin.h"
#include "display-info.h"
#include "battery-monitor.h"
#include "display-signal.h"
#include "display-lock.h"
#include "display-backlight.h"
+#include "display-misc.h"
#include "display-panel.h"
#include "display-config.h"
+#include "display-state-transition.h"
#include "shared/plugin.h"
#define POWERLOCK_CONF_FILE "/etc/deviced/powerlock.conf"
#define DISPLAY_DETACH_STR "display_detach"
#define UNKNOWN_STR "unknown"
-extern void init_pm_internal();
extern void init_save_userlock(void);
static struct display_plugin *disp_plgn;
-static struct _backlight_ops *backlight_ops;
+static struct display_backlight_ops *backlight_ops;
static struct battery_plugin *battery_plgn;
static int (*fp_get_charging_status) (int *val);
static void (*power_saving_func) (int onoff);
static enum device_ops_status status = DEVICE_OPS_STATUS_UNINIT;
-static guint timeout_src_id;
static int system_wakeup_flag = false;
static unsigned int custom_normal_timeout = 0;
static unsigned int custom_dim_timeout = 0;
-int custom_holdkey_block = false;
static char *custom_change_name;
static guint lock_timeout_id;
static guint transit_timer;
static int lock_screen_timeout = LOCK_SCREEN_INPUT_TIMEOUT;
static struct timeval lcdon_tv;
-static int lcd_paneloff_mode = false;
-static int stay_touchscreen_off = false;
/*
* The two variables(lcdon_broadcast, pmstate_suspend) must be set initial
* state because it should be sent from previous state at booting time.
{ S_POWEROFF, "S_POWEROFF", NULL, NULL, NULL, NULL },
};
-static int trans_table[S_END][EVENT_END] = {
- /* Timeout, Input */
- { S_START, S_START }, /* S_START */
- { S_LCDDIM, S_NORMAL }, /* S_NORMAL */
- { S_LCDOFF, S_NORMAL }, /* S_LCDDIM */
- { S_SLEEP, S_NORMAL }, /* S_LCDOFF */
- { S_SLEEP, S_STANDBY }, /* S_STANDBY */
- { S_LCDOFF, S_NORMAL }, /* S_SLEEP */
- { S_POWEROFF, S_POWEROFF }, /* S_POWEROFF */
-};
-
#define SHIFT_UNLOCK 4
#define SHIFT_CHANGE_STATE 7
#define CHANGE_STATE_BIT 0xF00 /* 1111 0000 0000 */
return &states[state];
}
-guint get_transition_timer(void)
-{
- return timeout_src_id;
-}
-
-static int display_brightness_changed(void *data)
-{
- int brt, ret;
-
- brt = DATA_VALUE_INT(data);
-
- ret = gdbus_signal_emit(NULL,
- DEVICED_PATH_DISPLAY,
- DEVICED_INTERFACE_DISPLAY,
- "Brightness",
- g_variant_new("(i)", brt));
- if (ret < 0)
- _E("Failed to send dbus signal Brightness.");
-
- return 0;
-}
-
static int display_auto_brightness_sensing(void *data)
{
if (!transit_timer)
del_node(state, node);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ if (!display_state_transition_is_there_state_transition_timer())
states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
}
initialized_killable_daemon_list = false;
}
-static unsigned long get_lcd_on_flags(void)
+static int get_device_flags(unsigned long *device_flags)
{
- unsigned long flags = NORMAL_MODE;
+ if (!device_flags)
+ return -EINVAL;
- if (lcd_paneloff_mode)
- flags |= LCD_PANEL_OFF_MODE;
+ *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;
+ }
if (ambient_get_state()) {
- flags |= AMBIENT_MODE;
- flags |= LCD_PHASED_TRANSIT_MODE;
+ *device_flags |= AMBIENT_MODE;
+ *device_flags |= LCD_PHASED_TRANSIT_MODE;
}
- return flags;
+ return 0;
}
bool touch_event_blocked(void)
void lcd_on_procedure(int state, enum device_flags flag)
{
- unsigned long flags = get_lcd_on_flags();
+ unsigned long flags = NORMAL_MODE;
+ display_plugin_get_device_flags(&flags);
flags |= flag;
int ret;
_I("[lcdstep] 0x%lx", flags);
if (flags & AMBIENT_MODE) {
- if (ambient_get_state() == false && dpms_get_cached_state() == DPMS_ON)
+ if (ambient_get_state() == false && display_panel_get_dpms_cached_state() == DPMS_ON)
return;
ambient_set_state(false);
}
touch_blocked = false;
}
-static unsigned long get_lcd_off_flags(void)
-{
- unsigned long flags = NORMAL_MODE;
-
- if (ambient_get_condition() == true) {
- flags |= AMBIENT_MODE;
- flags |= LCD_PHASED_TRANSIT_MODE;
- }
-
- if (stay_touchscreen_off)
- flags |= TOUCH_SCREEN_OFF_MODE;
-
- return flags;
-}
-
inline void lcd_off_procedure(enum device_flags flag)
{
- unsigned long flags = get_lcd_off_flags();
+ unsigned long flags = NORMAL_MODE;
+ display_plugin_get_device_flags(&flags);
flags |= flag;
/*
enter_doze();
}
-void set_stay_touchscreen_off(int val)
-{
- _I("Stay touch screen off: %d", val);
- stay_touchscreen_off = val;
-
- if (disp_plgn->pm_change_internal)
- disp_plgn->pm_change_internal(INTERNAL_LOCK_PM, LCD_NORMAL);
-}
-
-void set_lcd_paneloff_mode(int val)
-{
- _I("Lcd paneloff mode: %d", val);
- lcd_paneloff_mode = val;
-
- if (disp_plgn->pm_change_internal)
- disp_plgn->pm_change_internal(INTERNAL_LOCK_PM, LCD_NORMAL);
-}
-
-int low_battery_state(int val)
-{
- switch (val) {
- case VCONFKEY_SYSMAN_BAT_POWER_OFF:
- case VCONFKEY_SYSMAN_BAT_CRITICAL_LOW:
- case VCONFKEY_SYSMAN_BAT_REAL_POWER_OFF:
- return true;
- }
- return false;
-}
-
-void get_pname(pid_t pid, char *pname)
-{
- char buf[PATH_MAX];
- int cmdline, r;
-
- if (pid >= INTERNAL_LOCK_BASE)
- snprintf(buf, PATH_MAX, "/proc/%d/cmdline", getpid());
- else
- snprintf(buf, PATH_MAX, "/proc/%d/cmdline", pid);
-
- cmdline = open(buf, O_RDONLY);
- if (cmdline < 0) {
- pname[0] = '\0';
- _E("Process(%d) does not exist now(may be dead without unlock).", pid);
- return;
- }
-
- r = read(cmdline, pname, PATH_MAX);
- if ((r >= 0) && (r < PATH_MAX))
- pname[r] = '\0';
- else
- pname[0] = '\0';
-
- close(cmdline);
-}
-
static void del_state_cond(void *data, enum state_t state)
{
PmLockNode *tmp = NULL;
* 1. There should be no running state-transition timer
* 2. Released lock is one of the pm_cur_state's lock
* This emulates already expired transition timer */
- if (!timeout_src_id && get_pm_cur_state() == state)
+ if (!display_state_transition_is_there_state_transition_timer() && (get_pm_cur_state() == state))
states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)
return G_SOURCE_REMOVE;
}
-/* timeout handler */
-gboolean timeout_handler(void *data)
-{
- _I("Time out state %s", states[get_pm_cur_state()].name);
-
- if (timeout_src_id) {
- g_source_remove(timeout_src_id);
- timeout_src_id = 0;
- }
-
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
- return G_SOURCE_REMOVE;
-}
-
-void reset_timeout(int timeout)
-{
- if (!display_conf.timeout_enable)
- return;
-
- if ((get_pm_cur_state() == S_LCDOFF)
- && (is_emulator() == true || timeout_sleep_support == false))
- return;
-
- _I("Reset timeout(%d ms).", timeout);
- if (timeout_src_id != 0) {
- g_source_remove(timeout_src_id);
- timeout_src_id = 0;
- }
-
- if (trans_table[get_pm_cur_state()][EVENT_TIMEOUT] == get_pm_cur_state())
- return;
-
- if (timeout > 0)
- timeout_src_id = g_timeout_add(timeout,
- timeout_handler, NULL);
- else if (timeout == 0)
- states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
-}
-
/* get configurations from setting */
static int get_lcd_timeout_from_settings(void)
{
static inline bool check_lcd_is_on(void)
{
- if (dpms_get_cached_state() != DPMS_ON)
+ if (display_panel_get_dpms_cached_state() != DPMS_ON)
return false;
return true;
}
_I("custom lcd off by flag(%d)", flag);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
if (set_custom_lcdon_timeout(0) == true)
}
_I("platform lcd off by %s", reason);
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(flag);
/* state transition */
default_proc_change_state_action(next, -1);
break;
case S_LCDOFF:
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_EVENT);
if (set_custom_lcdon_timeout(0))
update_display_time();
return;
flags = GET_COND_FLAG(data->cond);
- get_pname(pid, pname);
+ display_misc_get_process_name(pid, pname);
if ((state == S_LCDOFF) && (get_pm_cur_state() == S_SLEEP) &&
(pm_get_power_lock() == POWER_UNLOCK))
return;
flags = GET_COND_FLAG(data->cond);
- get_pname(pid, pname);
+ display_misc_get_process_name(pid, pname);
tmp = find_node(state, pid);
del_node(state, tmp);
if (flags == 0) {
/* guard time for suspend */
if (get_pm_cur_state() == S_LCDOFF)
- reset_timeout(states[S_LCDOFF].timeout);
+ display_state_transition_reset_state_transition_timeout(states[S_LCDOFF].timeout);
} else {
if (flags & PM_FLAG_RESET_TIMER)
- reset_timeout(states[get_pm_cur_state()].timeout);
+ display_state_transition_reset_state_transition_timeout(states[get_pm_cur_state()].timeout);
}
- if (!timeout_src_id)
+ if (!display_state_transition_is_there_state_transition_timer())
states[get_pm_cur_state()].trans(EVENT_TIMEOUT);
return 0;
_E("Failed to set vconf value for lcd off source: %d", vconf_get_ext_errno());
}
-void print_info(int fd)
-{
- int s_index = 0;
- char buf[PATH_MAX + 255];
- int i = 1;
- int ret;
- char pname[PATH_MAX];
- PmLockNode *t;
- GList *elem;
- char time_buf[30];
-
- if (fd < 0)
- return;
-
- snprintf(buf, sizeof(buf),
- "\n==========================================="
- "===========================\n");
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
- snprintf(buf, sizeof(buf), "Timeout Info: Run[%dms] Dim[%dms] Off[%dms]\n",
- states[S_NORMAL].timeout,
- states[S_LCDDIM].timeout, states[S_LCDOFF].timeout);
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
-
- snprintf(buf, sizeof(buf), "Tran. Locked : %s %s %s\n",
- (get_trans_condition() & MASK_NORMAL) ? states[S_NORMAL].name : "-",
- (get_trans_condition() & MASK_DIM) ? states[S_LCDDIM].name : "-",
- (get_trans_condition() & MASK_OFF) ? states[S_LCDOFF].name : "-");
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
-
- snprintf(buf, sizeof(buf), "Current State: %s\n",
- states[get_pm_cur_state()].name);
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
-
- snprintf(buf, sizeof(buf), "Current Lock Conditions: \n");
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
-
- for (s_index = S_NORMAL; s_index < S_END; s_index++) {
- SYS_G_LIST_FOREACH(get_cond_head(s_index), elem, t) {
- get_pname((pid_t)t->pid, pname);
- ctime_r(&t->time, time_buf);
- time_buf[strlen(time_buf) - 1] = 0;
- snprintf(buf, sizeof(buf),
- " %d: [%s] locked by pid %d %s %s\n",
- i++, states[s_index].name, t->pid, pname, time_buf);
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("Write() failed: %d", errno);
- }
- }
-
- print_lock_info_list(fd);
-
-#ifdef ENABLE_PM_LOG
- pm_history_print(fd, 250);
-#endif
-}
-
-void save_display_log(const char *path)
-{
- int fd, ret;
- char buf[255];
- time_t now_time;
- char time_buf[30];
-
- _D("internal state is saved!");
-
- time(&now_time);
- ctime_r(&now_time, time_buf);
- time_buf[strlen(time_buf) - 1] = 0;
-
- fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0644);
- if (fd != -1) {
- snprintf(buf, sizeof(buf),
- "\npm_state_log now-time : %d(s) %s\n\n",
- (int)now_time, time_buf);
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("write() failed (%d)", errno);
-
- snprintf(buf, sizeof(buf), "pm_status_flag: %#x\n", get_pm_status_flag());
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("write() failed (%d)", errno);
-
- if (disp_plgn->get_lock_screen_state ) {
- snprintf(buf, sizeof(buf), "screen lock status : %d\n",
- disp_plgn->get_lock_screen_state());
- ret = write(fd, buf, strlen(buf));
- if (ret < 0)
- _E("write() failed (%d)", errno);
- }
- print_info(fd);
- close(fd);
- }
-
- fd = open("/dev/console", O_WRONLY);
- if (fd != -1) {
- print_info(fd);
- close(fd);
- }
-}
-
/* SIGHUP signal handler
* For debug... print info to syslog
*/
static int default_trans(int evt)
{
struct state *st = &states[get_pm_cur_state()];
- int next_state, ret;
+ int ret;
+ enum state_t next_state;
- next_state = (enum state_t)trans_table[get_pm_cur_state()][evt];
+ display_state_transition_get_next_transition_display_state(get_pm_cur_state(), &next_state, evt);
/* check conditions */
if (st->check && !st->check(get_pm_cur_state(), next_state)) {
struct timeval now_tv;
bool custom_status;
int brightness;
+ bool lcd_paneloff_mode = false;
if (status != DEVICE_OPS_STATUS_START) {
_E("Display is not started.");
lcdon_tv.tv_sec = 0;
}
/* set timer with current state timeout */
- reset_timeout(timeout);
+ display_state_transition_reset_state_transition_timeout(timeout);
if (get_pm_cur_state() == S_NORMAL) {
time(&last_update_time);
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF)) {
stop_lock_timer();
/* lcd off state : turn off the backlight */
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
- if (dpms_get_cached_state() == DPMS_ON
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
+ if (display_panel_get_dpms_cached_state() == DPMS_ON
|| lcd_paneloff_mode)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
break;
if ((get_pm_old_state() != S_SLEEP) && (get_pm_old_state() != S_LCDOFF))
stop_lock_timer();
- if (dpms_get_cached_state() == DPMS_ON)
+ if (display_panel_get_dpms_cached_state() == DPMS_ON)
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
if (!pm_get_power_lock_support()) {
states[get_pm_cur_state()].trans(EVENT_INPUT);
break;
case SETTING_LOW_BATT:
- if (low_battery_state(val)) {
+ if (display_misc_is_low_battery_state(val)) {
if (!(get_pm_status_flag() & CHRGR_FLAG))
power_saving_func(true);
set_pm_status_flag(LOWBT_FLAG);
bat_state = VCONFKEY_SYSMAN_BAT_NORMAL;
_E("Failed to get vconf value for battery status low: %d", vconf_get_ext_errno());
}
- if (low_battery_state(bat_state)) {
+ if (display_misc_is_low_battery_state(bat_state)) {
power_saving_func(true);
set_pm_status_flag(LOWBT_FLAG);
}
/* LCD on if lock screen show before waiting time */
if ((get_pm_cur_state() == S_NORMAL) &&
val == VCONFKEY_IDLE_LOCK &&
- dpms_get_cached_state() != DPMS_ON &&
+ display_panel_get_dpms_cached_state() != DPMS_ON &&
is_lcdon_blocked() == LCDON_BLOCK_NONE)
lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT);
stop_lock_timer();
bat_state = VCONFKEY_SYSMAN_BAT_NORMAL;
_E("Failed to get vconf value for battery status low: %d", vconf_get_ext_errno());
}
- if (low_battery_state(bat_state)) {
+ if (display_misc_is_low_battery_state(bat_state)) {
if (!(get_pm_status_flag() & CHRGR_FLAG)) {
power_saving_func(true);
set_pm_status_flag(LOWBT_FLAG);
states[get_pm_cur_state()].trans(EVENT_INPUT);
if (holdkey_block) {
- custom_holdkey_block = true;
+ display_lock_set_custom_holdkey_block(true);
_I("Hold key disabled.");
} else {
- custom_holdkey_block = false;
+ display_lock_set_custom_holdkey_block(false);
_I("Hold key enabled.");
}
if (!custom_change_name) {
_E("Failed to malloc.");
custom_normal_timeout = custom_dim_timeout = 0;
- custom_holdkey_block = false;
+ display_lock_set_custom_holdkey_block(false);
return -ENOMEM;
}
free(custom_change_name);
custom_change_name = 0;
custom_normal_timeout = custom_dim_timeout = 0;
- custom_holdkey_block = false;
+ display_lock_set_custom_holdkey_block(false);
update_display_time();
if (get_pm_cur_state() == S_NORMAL)
return done;
}
-static int battery_health_changed(void *data)
-{
- int health = DATA_VALUE_INT(data);
-
- _I("battery health change %d", health);
-
- if (health == HEALTH_GOOD) {
- clear_pm_status_flag(BATTERY_FLAG);
- clear_pm_status_flag(DIMSTAY_FLAG);
- if (dpms_get_cached_state() == DPMS_ON)
- auto_brightness_restore();
- } else if (health == HEALTH_LOW || health == HEALTH_HIGH || health == HEALTH_OVP) {
- set_pm_status_flag(BATTERY_FLAG);
- set_pm_status_flag(DIMSTAY_FLAG);
- if (dpms_get_cached_state() == DPMS_ON)
- display_backlight_update_by_default_brightness();
- }
-
- return 0;
-}
-
static int powerlock_load_config(struct parse_result *result, void *user_data)
{
char *name = NULL;
{
int timeout;
- if (!dpms_init())
+ if (!display_panel_init_dpms())
return G_SOURCE_CONTINUE;
switch (get_pm_cur_state()) {
/* check minimun lcd on time */
if (timeout < SEC_TO_MSEC(DEFAULT_NORMAL_TIMEOUT))
timeout = SEC_TO_MSEC(DEFAULT_NORMAL_TIMEOUT);
- reset_timeout(timeout);
+ display_state_transition_reset_state_transition_timeout(timeout);
}
break;
case S_LCDOFF:
lcd_off_procedure(LCD_OFF_BY_EVENT);
timeout = display_conf.lcdoff_timeout;
- reset_timeout(timeout);
+ display_state_transition_reset_state_transition_timeout(timeout);
break;
default:
break;
{
guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL);
if (id == 0)
- _E("Failed to add dpms_init timeout.");
+ _E("Failed to add display_panel_init_dpms timeout.");
}
+static void init_display_states(void *data)
+{
+ struct display_plugin *dp = (struct display_plugin *) data;
+ for(int i = 0; i < S_END; i++)
+ dp->display_states[i] = &states[i];
+}
/**
* Power manager Main
*
static int display_probe(void *data)
{
int ret;
+ struct display_plugin *dp = (struct display_plugin *) data;
+ assert(dp);
+
+ dp->config = &display_conf;
+ init_display_states(dp);
+ setup_display_plugin_backlight_ops(dp);
+ dp->delete_state_cond = del_state_cond;
+ dp->set_dim_state = set_dim_state;
+ dp->get_device_flags = get_device_flags;
+ setup_display_plugin_backlight_ops(dp);
/**
* load display service
return ret;
/* display_plugin instance initialization */
- init_pm_internal();
+ init_pm_internal(data);
disp_plgn->device_flags_to_string = __device_flags_to_string;
if (battery_plgn->handle) {
register_notifier(DEVICE_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
register_notifier(DEVICE_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
register_notifier(DEVICE_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
- register_notifier(DEVICE_NOTIFIER_BATTERY_HEALTH, battery_health_changed);
- register_notifier(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, display_brightness_changed);
register_notifier(DEVICE_NOTIFIER_LCD_AUTOBRT_SENSING, display_auto_brightness_sensing);
register_notifier(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
register_notifier(DEVICE_NOTIFIER_POWEROFF_TRIGGERED, poweroff_triggered_callback);
check_seed_status();
/* In smd test, TSP should be turned off if display panel is not existed. */
- if (dpms_get_cached_state() == -ENOENT) {
+ if (display_panel_get_dpms_cached_state() == -ENOENT) {
_I("Display panel is not existed.");
lcd_direct_control(DPMS_OFF, NORMAL_MODE);
exit_lcd_operation();
* since display manager can be launched later than deviced.
* In the case, display cannot be turned on at the first booting */
// wm_ready = check_wm_ready();
- if (dpms_init()) {
+ if (display_panel_init_dpms()) {
if (is_lcdon_blocked() != LCDON_BLOCK_NONE)
lcd_off_procedure(LCD_OFF_BY_EVENT);
else
if (display_conf.lcd_always_on) {
_I("LCD always on.");
- trans_table[S_NORMAL][EVENT_TIMEOUT] = S_NORMAL;
+ display_state_transition_set_transition_table_display_state(S_NORMAL, S_NORMAL, EVENT_TIMEOUT);
}
if (flags & WITHOUT_STARTNOTI) { /* start without noti */
set_pm_cur_state(S_NORMAL);
set_setting_pmstate(get_pm_cur_state());
/* timeout is not needed */
- reset_timeout(TIMEOUT_NONE);
+ display_state_transition_reset_state_transition_timeout(TIMEOUT_NONE);
if (CHECK_OPS(keyfilter_ops, exit))
keyfilter_ops->exit();
unregister_notifier(DEVICE_NOTIFIER_APPLICATION_BACKGROUND, display_app_background);
unregister_notifier(DEVICE_NOTIFIER_APPLICATION_FOREGROUND, display_app_foreground);
unregister_notifier(DEVICE_NOTIFIER_APPLICATION_TERMINATED, display_app_terminated);
- unregister_notifier(DEVICE_NOTIFIER_BATTERY_HEALTH, battery_health_changed);
- unregister_notifier(DEVICE_NOTIFIER_DISPLAY_BRIGHTNESS, display_brightness_changed);
unregister_notifier(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, power_resume_from_echomem_callback);
break;