diff options
| author | 2022-04-08 17:54:32 +0000 | |
|---|---|---|
| committer | 2022-04-08 18:00:14 +0000 | |
| commit | 5fa3a16679860a1f56bedae62b74184de69b81d5 (patch) | |
| tree | be3fe8c2068c197f017ea2ce568d14b577dc83e7 /libs/androidfw/StringPool.cpp | |
| parent | e3c41047b4215d33dd4ca749ce0ae68d8ff5415d (diff) | |
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions