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

Skip to content
Commit 35afa1ac authored by Sanath Kumar's avatar Sanath Kumar
Browse files

Implement new stop reason for maybe abandoned jobs

Jobs timed out and detected as "Abandoned" jobs will be reported as a
new stop reason.

The new stop reason is `STOP_REASON_TIMEOUT_ABANDONED`. It will be used
to indicate that a job was terminated by the Job Scheduler because it
was detected as being abandoned and it used up its maximum execution
time.

Abandoned jobs are those that do not call `jobFinished()` or return
`false` on `onStartJob()` to finish the active job before the strong
reference to `JobParameters` is lost. These can potentially be running
nothing while the wakelock is being held, which can have a negative
affect on battery life.

bug: 372529068
Test: atest CtsJobSchedulerTestCases
Test: atest FrameworksMockingServicesTests
Flag: android.app.job.handle_abandoned_jobs

Change-Id: I5a538b7d454ae33e371e43e3afd5e85c87b4d26e
parent 77842fdf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment