Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d76b7bf6 authored by Billy Lau's avatar Billy Lau
Browse files

Schedule binary measurement job at boot completed.

Instead of waiting until first invocation of commandline,
we are scheduling the computation of SHA256 digest of
APEXs and Modules at post boot such that the job can
be run when the device is idle.

For this purpose, an inner static class that extends
JobServer is created, and a declaration of this service
in the manifest which is protected by BIND_JOB_SERVICE
is also necessary.

This allows the logging of APEX information to statsd
to still happen at least once every reboot (when the
device is idle). Otherwise, logging may never occur
if the users never make use of the commandline.

Bug: 217469982
Test: Manual.
Job is found to be triggered automatically when device
is left overnight.

Job can also be manually triggered (for test) via
`adb shell cmd jobscheduler run android <job_id>`
Job id can be found via printout in logcat after
the scheduling is successfully done.

After job is run, `adb shell cmd transparency
get apex_info` no longer has latency upon first
invocation.

Change-Id: I7cff80d53b37152639bb9aebaca50f5b61733ea7
parent deae8db7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment