mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
folio_daemon: start and stop with other services
If sensorservice goes down while folio_daemon is running, folio_daemon
will gracefully exit and restart. If sensorservice remains down while
folio_daemon is starting, it will eventually crash due to the way the
ASensorManager_getInstanceForPackage() API behaves (i.e., it will exit
with a SIGABRT after five minutes of waiting). We can reduce the
chance of this happening by ensuring folio_daemon is only started when
its dependent services are explicitly started as well.
Note that this cannot guarantee that folio_daemon will *never* crash due
to SIGABRT, since there is no variant of
ASensorManager_getInstanceForPackage() that allows for graceful handling
of the service timeout. Events that negatively affect the availability
of sensors are outside the control of folio_daemon.
Bug: 73555660
Test: loaded on walleye and tested with `stop` and `start` commands
Change-Id: I65e1b72745719f2540bff7cab8e556725486bcad
(cherry picked from commit 9ebb33ed13)
This commit is contained in:
@@ -502,6 +502,13 @@ service vendor.folio_daemon /system/bin/folio_daemon
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
on property:init.svc.zygote=running
|
||||
start vendor.folio_daemon
|
||||
|
||||
on property:init.svc.zygote=stopped
|
||||
stop vendor.folio_daemon
|
||||
|
||||
service vendor.perfd /vendor/bin/perfd
|
||||
class main
|
||||
|
||||
Reference in New Issue
Block a user