BackgroundDexOptService: defer post-boot job further

Delay the post-boot dexopt job to avoid mmap_sem contention caused by
mapping dex files.

Test: boot, dexopt starts later
Bug: 161866124
(cherry pick from commit 0977880865)

Merged-In: Iaceb2b7c34c7b923778a8a603d7b9666ea9a20c4
Change-Id: Iaceb2b7c34c7b923778a8a603d7b9666ea9a20c4
This commit is contained in:
Tim Murray
2021-01-15 10:33:08 -08:00
committed by Calin Juravle
parent f4a6ba88b3
commit b42d33ec7b

View File

@@ -120,8 +120,8 @@ public class BackgroundDexOptService extends JobService {
// Schedule a one-off job which scans installed packages and updates // Schedule a one-off job which scans installed packages and updates
// out-of-date oat files. // out-of-date oat files.
js.schedule(new JobInfo.Builder(JOB_POST_BOOT_UPDATE, sDexoptServiceName) js.schedule(new JobInfo.Builder(JOB_POST_BOOT_UPDATE, sDexoptServiceName)
.setMinimumLatency(TimeUnit.MINUTES.toMillis(1)) .setMinimumLatency(TimeUnit.MINUTES.toMillis(10))
.setOverrideDeadline(TimeUnit.MINUTES.toMillis(1)) .setOverrideDeadline(TimeUnit.MINUTES.toMillis(60))
.build()); .build());
// Schedule a daily job which scans installed packages and compiles // Schedule a daily job which scans installed packages and compiles