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

Skip to content
Commit 514337c7 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix Doze FGS job handling.

While in Doze, jobs of apps the Foreground Service proc state or higher
are only exempted if they're expedited or have the
important-while-foreground bit set. We were accidentally considering all
uidActive jobs as exempt, letting the device exit the Doze maintenance
window early, and then stopping the uidActive app's jobs if they weren't
exempted or had the important-while-foreground bit set. This meant that
if only the app running a foreground service had jobs to run and the app
didn't ask for the jobs to be exempted from Doze, the maintenance window
would last for 30 seconds and the jobs would be stopped, but if there
were other background jobs to be run, the maintenance window could last
for the full time (10 minutes or whatever it would be). Fixing the
inconsistency so that we don't exit a maintenance window early when
there are non-exempt jobs running.

Bug: 216150579
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: I07de57b364c9fee995eca020153622ba85d17c96
parent 8b22e7b7
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