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

Commit d7b1ae4c authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Automerger Merge Worker
Browse files

Merge "Floss: Cancel discovery before BREDR pairing/connection" am: 1475d0d2

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2014497

Change-Id: I58eba3d0c005c1a596cdfe71a668ca9ec988b2de
parents 60351072 1475d0d2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -949,6 +949,10 @@ impl IBluetooth for Bluetooth {
        }

        let address = addr.unwrap();

        // BREDR connection won't work when Inquiry is in progress.
        self.cancel_discovery();

        self.intf.lock().unwrap().create_bond(&address, transport) == 0
    }

@@ -1153,6 +1157,9 @@ impl IBluetooth for Bluetooth {
            return false;
        }

        // BREDR connection won't work when Inquiry is in progress.
        self.cancel_discovery();

        // Check all remote uuids to see if they match enabled profiles and connect them.
        let uuids = self.get_remote_uuids(device.clone());
        for uuid in uuids.iter() {