Enhance display/power lock managemenent 01/242701/6 accepted/tizen/unified/20200902.145534 submit/tizen/20200902.021453
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 31 Aug 2020 02:38:10 +0000 (11:38 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 1 Sep 2020 05:56:21 +0000 (05:56 +0000)
commitb8087749b614f5460bec2a321756c661cbd86310
treec4a607398512a66b7bb7e5fa04f1f9767c3c7479
parente9731fde6488fd49dbeb937f280d5769886eef76
Enhance display/power lock managemenent

Summary:
 - Detect someone who holds lock longer than 30 minutes.
 - If a general application is detected, deviced generates signal
   with time information in addtion to pid.
 - If a specific daemon is detected, deviced tries to kill it directly.

For general applications:
   Added an addition information, lock holding time in second, to the
  signal "pmlock_expired". This makes someone, who is in charge of
  application lifecycle and notification, possible to determine whether
  to kill that application or not.

For some specific killable daemon:
   Added list of killable daemon to conf file and deviced loads that list.
  If a killable daemon holds lock longer than 30 minutes, deviced directly
  sends SIGTERM to that daemon, releasing lock. After for a while, deviced
  checks once more, if the daemon is still alive then, sends SIGKILL.

Change-Id: Ia0d433facdcc7814e19278619a58a111ff7ff7c3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/wearable/display/core.c
src/display/core.h
src/display/display-lock.c
src/display/display-lock.h