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

Commit ca3f31ed authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Fix broadcast receiver leak issue"

parents 45c89bd0 974a0b43
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -120,6 +120,12 @@ public final class BluetoothEventManager {
        registerProfileIntentReceiver();
    }

    public void setDefaultReceiverHandler() {
        mContext.unregisterReceiver(mBroadcastReceiver);
        mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler);
        registerProfileIntentReceiver();
    }

    /** Register to start receiving callbacks for Bluetooth events. */
    public void registerCallback(BluetoothCallback callback) {
        synchronized (mCallbacks) {
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ public final class LocalBluetoothProfileManager {
                "Warning: PBAP Client profile was previously added but the UUID is now missing.");
        }

        mEventManager.registerProfileIntentReceiver();
        mEventManager.setDefaultReceiverHandler();

        // There is no local SDP record for HID and Settings app doesn't control PBAP Server.
    }