Add charging requirement for scheduled job.
Previously, the job to compute APEX and module hashes are scheduled to be run when device is idle. However, that alone causes an idle power issue. We are thus adding a requirement for this job to be run when the device is charging. Bug: 229137737 Test: Manual Change-Id: I6a86aac249541854948968e21dfbc5617cb59970
This commit is contained in:
@@ -441,6 +441,7 @@ public class BinaryTransparencyService extends SystemService {
|
||||
final JobInfo jobInfo = new JobInfo.Builder(COMPUTE_APEX_MODULE_SHA256_JOB_ID,
|
||||
new ComponentName(context, UpdateMeasurementsJobService.class))
|
||||
.setRequiresDeviceIdle(true)
|
||||
.setRequiresCharging(true)
|
||||
.build();
|
||||
if (jobScheduler.schedule(jobInfo) != JobScheduler.RESULT_SUCCESS) {
|
||||
Slog.e(TAG, "Failed to schedule job to update binary measurements.");
|
||||
|
||||
Reference in New Issue
Block a user