Skip to content
Commit 5fa3a166 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix pending queue job presence check.

There are rare situations in which two different JobStatus might return
0 using the Comparator (eg. when persisted jobs are loaded at boot). In
those cases, binary search may sometimes return the wrong index. Switch
to a linear scan to ensure correctness. Even with the switch to a linear
scan, the PendingJobQueue implementation is still more efficient than
the prior mechanism (used before the switch to PendingJobQueue).

Bug: 228334264
Test: atest FrameworksServicesTests:PendingJobQueueTest
Change-Id: I4a31cb1fd5e0a8997eddaed3ecb45a4309abfd59
parent e3c41047
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