static guint lock_timeout_id;
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
static unsigned long get_lcd_on_flags(void)
{
unsigned long flags = NORMAL_MODE;
+ bool lcd_paneloff_mode = false;
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
if (lcd_paneloff_mode)
flags |= LCD_PANEL_OFF_MODE;
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);
-}
-
static void del_state_cond(void *data, enum state_t state)
{
PmLockNode *tmp = NULL;
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.");
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
+ 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);
static guint lock_timeout_id;
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
static unsigned long get_lcd_on_flags(void)
{
unsigned long flags = NORMAL_MODE;
+ bool lcd_paneloff_mode = false;
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
if (lcd_paneloff_mode)
flags |= LCD_PANEL_OFF_MODE;
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);
-}
-
static void del_state_cond(void *data, enum state_t state)
{
PmLockNode *tmp = NULL;
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.");
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
+ 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);
static guint lock_timeout_id;
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
static unsigned long get_lcd_on_flags(void)
{
unsigned long flags = NORMAL_MODE;
+ bool lcd_paneloff_mode = false;
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
if (lcd_paneloff_mode)
flags |= LCD_PANEL_OFF_MODE;
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);
-}
-
static void del_state_cond(void *data, enum state_t state)
{
PmLockNode *tmp = NULL;
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.");
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
+ 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);
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
static unsigned long get_lcd_on_flags(void)
{
unsigned long flags = NORMAL_MODE;
+ bool lcd_paneloff_mode = false;
+ display_panel_get_lcd_paneloff_mode(&lcd_paneloff_mode);
if (lcd_paneloff_mode)
flags |= LCD_PANEL_OFF_MODE;
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);
-}
-
static void del_state_cond(void *data, enum state_t state)
{
PmLockNode *tmp = NULL;
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.");
lcd_off_procedure(LCD_OFF_BY_TIMEOUT);
}
+ 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);
#include "ambient-mode.h"
#include "display-backlight.h"
#include "display-panel.h"
+#include "display-plugin.h"
#define MAX_WHITE_BALANCE_GAIN 2047
#define MAX_WHITE_BALANCE_OFFSET 2047
#define LCD_PHASED_CHANGE_STEP 5
static int dpms_running_state = DPMS_SETTING_DONE;
+static bool lcd_paneloff_mode = false;
/* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
int display_panel_set_dpms_state(int dpms_on, enum device_flags flags)
return ret;
}
+/* FIXME: display_plugin_~ function return value should be handling after refactoring */
+void display_panel_set_lcd_paneloff_mode(bool on)
+{
+ _I("Lcd paneloff mode: %d", on);
+ lcd_paneloff_mode = on;
+
+ display_plugin_pm_change_internal(INTERNAL_LOCK_PM, LCD_NORMAL);
+}
+
+/* FIXME: This function is temporary, it can be redefined or not */
+void display_panel_get_lcd_paneloff_mode(bool *on)
+{
+ if (!on) {
+ _E("Inavlid parameter to get lcd paneloff mode");
+ return;
+ }
+
+ *on = lcd_paneloff_mode;
+}
+
/* FIXME: This function is deprecated, should be fixed after plugin refactoring */
void display_panel_set_dpms_running_state(int val)
{
int display_panel_set_panel_state_by_on_state(enum device_flags flags);
int display_panel_set_panel_state_by_off_state(enum device_flags flags);
int display_panel_set_panel_state_by_standby_state(bool standby_on);
+void display_panel_set_lcd_paneloff_mode(bool on);
+void display_panel_get_lcd_paneloff_mode(bool *on);
/* Deprecated functions */
int display_panel_set_image_effect(enum display_image_effect effect);
int display_panel_get_image_effect(enum display_image_effect *effect);
void save_display_log(const char *path);
int custom_lcdon(int timeout);
void set_stay_touchscreen_off(int val);
-void set_lcd_paneloff_mode(int val);
void lcd_on_direct(enum device_flags flags);
void lcd_on_procedure(int state, enum device_flags flag);
void lcd_off_procedure(enum device_flags flag);
g_variant_get(param, "(i)", &val);
- set_lcd_paneloff_mode(val);
+ display_panel_set_lcd_paneloff_mode((bool)val);
return g_variant_new("(i)", ret);
}