return reply;
}
+static DBusMessage *e_dbus_setautobrightnessmin(E_DBus_Object *obj, DBusMessage *msg)
+{
+ DBusMessageIter iter;
+ DBusMessage *reply;
+ int val, ret;
+ pid_t pid;
+
+ dbus_message_iter_init(msg, &iter);
+ dbus_message_iter_get_basic(&iter, &val);
+
+ pid = get_edbus_sender_pid(msg);
+ ret = set_autobrightness_min(val);
+ if (ret)
+ _E("fail to set autobrightness min %d, %d by %d", val, ret, pid);
+ else
+ _I("set autobrightness min %d by %d", val, pid);
+
+ 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 struct edbus_method {
const char *member;
const char *signature;
{ "setframerate", "i", "i", e_dbus_setframerate },
{ "getautobrightnessinterval", NULL, "i", e_dbus_getautobrightnessinterval },
{ "setautobrightnessinterval", "i", "i", e_dbus_setautobrightnessinterval },
+ { "setautobrightnessmin", "i", "i", e_dbus_setautobrightnessmin },
/* Add methods here */
};
static int fault_count = 0;
static int power_saving_display_stat = 0;
static int sampling_interval = SAMPLING_INTERVAL;
+static int min_brightness = PM_MIN_BRIGHTNESS;
static bool alc_handler(void* data)
{
return 0;
}
+int set_autobrightness_min(int val)
+{
+ if (val < PM_MIN_BRIGHTNESS || val > PM_MAX_BRIGHTNESS)
+ return -EINVAL;
+
+ min_brightness = val;
+
+ return 0;
+}
+
static void __attribute__ ((constructor)) pm_lsensor_init(void)
{
_default_action = NULL;