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

Commit 9f1d503b authored by William Escande's avatar William Escande
Browse files

SdpManager: Pass looper from adapter

When fastBind is enabled test are running without a prepared looper. By
injecting the current looper we solve this.

Bug: 323672160
Test: atest BluetoothInstrumentationTests
Change-Id: I146a133fe0e6a0704eaa563455c6bab351a0ffef
parent de46532e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -700,7 +700,11 @@ public class AdapterService extends Service {
                        "BluetoothQualityReportNativeInterface cannot be null when BQR starts");
        mBluetoothQualityReportNativeInterface.init();

        if (Flags.fastBindToApp()) {
            mSdpManager = new SdpManager(this, mLooper);
        } else {
            mSdpManager = new SdpManager(this);
        }

        mDatabaseManager = new DatabaseManager(this);
        mDatabaseManager.start(MetadataDatabase.createDatabase(this));
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ public class SdpManager {
        this(adapterService, Looper.myLooper());
    }

    SdpManager(AdapterService adapterService, Looper looper) {
    public SdpManager(AdapterService adapterService, Looper looper) {
        mAdapterService = adapterService;
        mNativeInterface.init(this);
        mNativeAvailable = true;