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

Commit 3c4cb187 authored by Timur Calmatui's avatar Timur Calmatui
Browse files

Allow JobScheduler concurrency limit as low as 1

Bug: 396695710
Test: atest JobConcurrencyManagerTest
Test: manually check `adb shell dumpsys jobscheduler`
Test: manually verify via a trace fewer concurrent jobs
Flag: EXEMPT bugfix
Change-Id: I0c8783939add1fde9c49b3d61db473cc007368c3
parent 1a3da925
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2039,8 +2039,8 @@ class JobConcurrencyManager {
        DeviceConfig.Properties properties =
                DeviceConfig.getProperties(DeviceConfig.NAMESPACE_JOB_SCHEDULER);

        // Concurrency limit should be in the range [8, MAX_CONCURRENCY_LIMIT].
        mSteadyStateConcurrencyLimit = Math.max(8, Math.min(MAX_CONCURRENCY_LIMIT,
        // Concurrency limit should be in the range [1, MAX_CONCURRENCY_LIMIT].
        mSteadyStateConcurrencyLimit = Math.max(1, Math.min(MAX_CONCURRENCY_LIMIT,
                properties.getInt(KEY_CONCURRENCY_LIMIT, DEFAULT_CONCURRENCY_LIMIT)));

        mScreenOffAdjustmentDelayMs = properties.getLong(