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

Commit 9116e28f authored by Evan Chen's avatar Evan Chen
Browse files

Fix devicePresence no callback after reboot

Executes mDevicePresenceProcessor.init() upon PHASE_BOOT_COMPLETED.
This change addresses the issue of prematurely initiating BLE/Bluetooth
scans during PHASE_SYSTEM_SERVICES_READY, when the Bluetooth service may not be fully operational

Test: cts
Bug: 349858260
Flag: EXEMPT bugfix
Change-Id: Ia0b3be5fcc0005bb4d5b7d2654b6ebb64c7cddb6
parent 47d3c329
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -223,8 +223,8 @@ public class CompanionDeviceManagerService extends SystemService {
            // delays (even in case of the Main Thread). It may be fine overall, but would require
            // updating the tests (adding a delay there).
            mPackageMonitor.register(context, FgThread.get().getLooper(), UserHandle.ALL, true);
            mDevicePresenceProcessor.init(context);
        } else if (phase == PHASE_BOOT_COMPLETED) {
            mDevicePresenceProcessor.init(context);
            // Run the Inactive Association Removal job service daily.
            InactiveAssociationsRemovalService.schedule(getContext());
            mCrossDeviceSyncController.onBootCompleted();