}
}
+/**
+ * FIXME: It is currently not being used.
+ * Move it to plugin git, platform/core/system/plugin/deviced-wearable,
+ * and register it as plugin operation through plugin interface. Or remove it
+ * if it won't be used anymore.
+ */
static int update_setting(int key_idx, int val)
{
int ret;
struct display_plugin g_display_plugin;
-int display_plugin_update_pm_setting(int key_idx, int val)
-{
- if (g_display_plugin.update_pm_setting)
- return g_display_plugin.update_pm_setting(key_idx, val);
-
- return 0;
-}
-
-bool display_plugin_is_there_update_pm_setting(void)
-{
- if (g_display_plugin.update_pm_setting)
- return true;
-
- return false;
-}
-
/* FIXME: return 0 can be value of get_lock_screen_state, it is hard to distinguish error or not */
int display_plugin_get_lock_screen_state(void)
{
#define BR_IMPLICIT (-1)
struct display_plugin {
- int (*update_pm_setting) (int key_idx, int val);
int (*get_lock_screen_state) (void);
bool system_wakeup_flag;
int (*auto_brightness_control) (enum brightness_request_e request, int set_brightness);
};
extern struct display_plugin g_display_plugin;
-int display_plugin_update_pm_setting(int key_idx, int val);
-bool display_plugin_is_there_update_pm_setting(void);
int display_plugin_get_lock_screen_state(void);
int display_plugin_get_system_wakeup_flag(bool *flag);
int display_plugin_set_system_wakeup_flag(bool flag);
static int custom_dim_timeout = 0;
static int exclusive_dim_timeout = EXCLUSIVE_DIM_TIMEOUT_UNSET;
-int (*update_pm_setting) (int key_idx, int val);
-
static gboolean display_state_send_system_event(gpointer data)
{
const char *str;
return 0;
}
+/**
+ * FIXME:
+ * Those key_idx not related to setting app should be removed
+ * and be handled in another function. This function is only for
+ * detecting events controlling device from setting app.
+ */
int display_setting_update_pm_setting(int key_idx, int val)
{
int ret;
enum syscommon_deviced_display_state current;
- if (display_plugin_is_there_update_pm_setting())
- return display_plugin_update_pm_setting(key_idx, val);
+ ret = syscommon_plugin_deviced_display_notify_setting_value_changed(key_idx, val);
+ if (ret == 0)
+ return 0;
+
+ if (ret != -EOPNOTSUPP)
+ return ret;
ret = display_state_get_current(¤t);
if (ret < 0)
return 0;
}
-/* FIXME: update_pm_setting functions initalization should be changed after relocation work */
int init_setting(int (*func) (int key_idx, int val))
{
int i;
- if (func != NULL)
- disp_plgn->update_pm_setting = func;
-
for (i = SETTING_BEGIN; i < SETTING_GET_END; i++) {
/*
* To pass an index data through the vconf infratstructure