states[pm_cur_state].trans(EVENT_INPUT);
}
break;
+ case SETTING_LOCK_SCREEN_BG:
+ set_lock_screen_bg_state(val);
+ if (pm_cur_state == S_NORMAL) {
+ states[pm_cur_state].trans(EVENT_INPUT);
+ }
+ break;
case SETTING_POWER_SAVING:
if (val == 1)
vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY,
*/
#include <error.h>
+#include <stdbool.h>
#include <Ecore.h>
#include <device-node.h>
return reply;
}
-static struct edbus_method {
+static DBusMessage *e_dbus_lockscreenbgon(E_DBus_Object *obj, DBusMessage *msg)
+{
+ DBusMessageIter iter;
+ DBusMessage *reply;
+ int ret = 0;
+ char *on;
+
+ ret = dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &on,
+ DBUS_TYPE_INVALID);
+
+ if (!ret) {
+ _E("fail to update lcdscreen bg on state %d", ret);
+ ret = -EINVAL;
+ goto error;
+ }
+
+ if (!strcmp(on, "true"))
+ update_pm_setting(SETTING_LOCK_SCREEN_BG, true);
+ else if (!strcmp(on, "false"))
+ update_pm_setting(SETTING_LOCK_SCREEN_BG, false);
+ else
+ ret = -EINVAL;
+
+error:
+ reply = dbus_message_new_method_return(msg);
+ dbus_message_iter_init_append(reply, &iter);
+ dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
+
+ return reply;
+}
+
+static const struct edbus_method {
const char *member;
const char *signature;
const char *reply_signature;
{ "getautobrightnessinterval", NULL, "i", e_dbus_getautobrightnessinterval },
{ "setautobrightnessinterval", "i", "i", e_dbus_setautobrightnessinterval },
{ "setautobrightnessmin", "i", "i", e_dbus_setautobrightnessmin },
+ { "LockScreenBgOn", "s", "i", e_dbus_lockscreenbgon },
/* Add methods here */
};
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <stdbool.h>
#include "display/util.h"
#include "setting.h"
};
static int lock_screen_state = VCONFKEY_IDLE_UNLOCK;
+static bool lock_screen_bg_state = false;
int (*update_pm_setting) (int key_idx, int val);
}
}
+int get_lock_screen_bg_state(void)
+{
+ return lock_screen_bg_state;
+}
+
+void set_lock_screen_bg_state(bool state)
+{
+ _I("state is %d", state);
+ lock_screen_bg_state = state;
+}
+
int get_charging_status(int *val)
{
return vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, val);