Skip to content

Commit

Permalink
[inactivity] Optional shutdown after idling. Fixes MER#1889
Browse files Browse the repository at this point in the history
When doing ad-hoc testing/debugging on several devices one
often finds out that the device that is needed next needs
to be charged before it can be used.

Add option for automatically shutting down device when it
is not connected to a charger and has been idling longer
than user specified time limit.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Mar 16, 2018
1 parent 2169fd0 commit 08ba6b6
Show file tree
Hide file tree
Showing 6 changed files with 443 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .depend
Expand Up @@ -9,6 +9,7 @@ builtin-gconf.o:\
mce.h\
modules/display.h\
modules/doubletap.h\
modules/inactivity.h\
modules/led.h\
modules/memnotify.h\
modules/powersavemode.h\
Expand All @@ -27,6 +28,7 @@ builtin-gconf.pic.o:\
mce.h\
modules/display.h\
modules/doubletap.h\
modules/inactivity.h\
modules/led.h\
modules/memnotify.h\
modules/powersavemode.h\
Expand Down Expand Up @@ -748,19 +750,25 @@ modules/inactivity.o:\
datapipe.h\
libwakelock.h\
mce-dbus.h\
mce-dsme.h\
mce-hbtimer.h\
mce-log.h\
mce-setting.h\
mce.h\
modules/inactivity.h\

modules/inactivity.pic.o:\
modules/inactivity.c\
builtin-gconf.h\
datapipe.h\
libwakelock.h\
mce-dbus.h\
mce-dsme.h\
mce-hbtimer.h\
mce-log.h\
mce-setting.h\
mce.h\
modules/inactivity.h\

modules/keypad.o:\
modules/keypad.c\
Expand Down Expand Up @@ -1302,6 +1310,7 @@ tools/mcetool.o:\
mce.h\
modules/display.h\
modules/doubletap.h\
modules/inactivity.h\
modules/led.h\
modules/memnotify.h\
modules/powersavemode.h\
Expand All @@ -1319,6 +1328,7 @@ tools/mcetool.pic.o:\
mce.h\
modules/display.h\
modules/doubletap.h\
modules/inactivity.h\
modules/led.h\
modules/memnotify.h\
modules/powersavemode.h\
Expand Down
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -591,6 +591,7 @@ NORMALIZE_USES_SPC =\
modules/fingerprint.c\
modules/keypad.h\
modules/inactivity.c\
modules/inactivity.h\
modules/memnotify.c\
modules/memnotify.h\
modules/packagekit.c\
Expand Down
6 changes: 6 additions & 0 deletions builtin-gconf.c
Expand Up @@ -32,6 +32,7 @@
#include "modules/powersavemode.h"
#include "modules/doubletap.h"
#include "modules/led.h"
#include "modules/inactivity.h"

#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -1835,6 +1836,11 @@ static const setting_t gconf_defaults[] =
.type = "i",
.def = G_STRINGIFY(MCE_DEFAULT_TK_PROXIMITY_DELAY_INCALL),
},
{
.key = MCE_SETTING_INACTIVITY_SHUTDOWN_DELAY,
.type = "i",
.def = G_STRINGIFY(MCE_DEFAULT_INACTIVITY_SHUTDOWN_DELAY),
},
{
.key = NULL,
}
Expand Down

0 comments on commit 08ba6b6

Please sign in to comment.