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

Commit 9fe27fa7 authored by Eric Chiang's avatar Eric Chiang
Browse files

Fix missing bluetooth profiles

There is a race condition where remote profiles could load before local
profiles finish being instantiated. This causes the remote device to be
loaded without certain profiles. We can fix it by ensuring that the
local profiles are created before loading the remote profiles.

Bug: 217202245
Bug: 309531947
Test: manually on seahawk
Change-Id: I3e785816f8dda08d3ff9f756d735c09424881479
(cherry picked from commit 709803fb573a2c682be74c38284fdf043bb69661)
parent d7e3b0dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class LocalBluetoothProfileManager {
    /**
     * create profile instance according to bluetooth supported profile list
     */
    void updateLocalProfiles() {
    synchronized void updateLocalProfiles() {
        List<Integer> supportedList = BluetoothAdapter.getDefaultAdapter().getSupportedProfiles();
        if (CollectionUtils.isEmpty(supportedList)) {
            if (DEBUG) Log.d(TAG, "supportedList is null");