-[LOWBAT]
-#low battery level
+[BatteryLevelThreshold]
Normal=100
Warning=15
Critical=5
CriticalMethod=critical
# hold wakelock if a charger has been connected, iot-headless only
-[CHARGER_WAKELOCK]
+[ChargerWakelock]
ChargerWakeLockEnabled=yes
# define event-action, iot-headless only
# - define which event(device-notifiy) is filtered
# Action=
# - define action for the event
-[EVENT_ACTION]
+[EventAction]
Name=CHARGER_CONNECTED
Enum=2001
DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_CONNECTED
Action=sleep,sleep
Action=normal,normal
-[EVENT_ACTION]
+[EventAction]
Name=CHARGER_DISCONNECTED
Enum=2002
DeviceNotifier=DEVICE_NOTIFIER_BATTERY_CHARGER_DISCONNECTED
-[EVENT_ACTION]
+[EventAction]
#INITIAL_STATE_BY_POWERKEY_BOOTING
Enum=3000
BootReason=powerkey
Action=start,normal
-[EVENT_ACTION]
+[EventAction]
#INITIAL_STATE_BY_CHARGER_BOOTING
Enum=3001
BootReason=charger
-# [EVENT_ACTION] - define event and corresponding action
+# [EventAction] - define event and corresponding action
# Name=string
# - define mnemonic for the event, and it is only used for logging
# Enum=integer
# Action=current,next
# - define state transition action for the event.
-[EVENT_ACTION]
+[EventAction]
Name=BLINKKEY_EDGE
Enum=1000
Keycode=power
TriggerType=edge
Action=sleep,sleep
-[EVENT_ACTION]
+[EventAction]
Name=SHORTKEY_LEVEL
Enum=1001
Keycode=power
TriggerType=level
Action=broadcast
-[EVENT_ACTION]
+[EventAction]
Name=SHORTKEY_EDGE
Enum=1002
Keycode=power
Action=normal,sleep
Action=sleep,normal
-[EVENT_ACTION]
+[EventAction]
Name=LONGKEY_LEVEL
Enum=1003
Keycode=power
TriggerType=level
Action=broadcast
-[EVENT_ACTION]
+[EventAction]
Name=LONGKEY_EDGE
Enum=1004
Keycode=power
if (!result || !result->props)
return 0;
- if (MATCH(result->section, "EVENT_ACTION")) {
+ if (MATCH(result->section, "EventAction")) {
handler = calloc(1, sizeof(struct battery_event_handler));
if (!handler)
return 0;
if (!result || !result->props)
return 0;
- if (!MATCH(result->section, "EVENT_ACTION"))
+ if (!MATCH(result->section, "EventAction"))
return 0;
_D("Input section=%s", result->section);
struct section_property *prop;
char *bootreason = (char *) data;
- if (!MATCH(result->section, "EVENT_ACTION"))
+ if (!MATCH(result->section, "EventAction"))
return 0;
SYS_G_LIST_FOREACH(result->props, elem, prop) {
static int check_charger_wakelock(struct parse_result *result, void *user_data)
{
- if (MATCH(result->section, "CHARGER_WAKELOCK")
+ if (MATCH(result->section, "ChargerWakelock")
&& MATCH(result->name, "ChargerWakeLockEnabled")
&& MATCH(result->value, "yes"))
*(int *) user_data = 1;
if (!info)
return -EINVAL;
- if (!MATCH(result->section, "LOWBAT"))
+ if (!MATCH(result->section, "BatteryLevelThreshold"))
return -EINVAL;
name = result->name;