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
Loading
Please register or sign in to comment