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

Skip to content
Commit fada88b8 authored by Omair Kamil's avatar Omair Kamil
Browse files

Actually prevent a repeated unregistration of mBatchAlarmReceiver.

Uses a AtomicReferences that is read and atomically set to null. Also moves it to the ScanNative inner class, and makes the rest of the ScanNative members final.

Note that there are other receivers in ScanManager that may be unregistered multiple times. In those cases the IllegalArgumentException is caught. We should consider changing that, because if cleanup is called multiple times there will be a bunch of errors logged which could cause issues to be mistriaged. But that is out of scope of this change.

Bug: 354303095
Fix: 354303095
Flag: EXEMPT, what isn't mechanical refactor is trivial
Test: atest ScanManagerTest, atest BumbleBluetoothTests
Change-Id: Ib3982c3a933459b77aa305f54517b527e55701c9
parent 02f06493
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