Skip to content
Commit 626ec290 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix async behavior and address possible race conditions.

1. Don't release the lock until we've fully processed an app or user
   removal so that JS stays in a consistent state outside of the lock.
   Before, we released the lock between cancelling jobs and telling
   controllers of the removal, so there was a short period where JS was
   internally inconsistent and an app scheduling a job could land in JS's
   inconsistency.
2. Actually lock around methods that require the lock be held.

Bug: 183921387
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: I440e3c7753d119e025b0359d2b35bec90fa19628
parent ddf368aa
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