Fix unregisterScanner call in BluetoothLeScanner.

LE scanners were originally part of the GATT client, but were seperated
out and have their own registration API, so the BluetoothLeScanner call
to unregisterClient should be updated to call unregisterScanner.

Bug:75984723
Change-Id: I4c0543beb6d7b706cf75e78fcfb58480a6efd1d8
This commit is contained in:
Claire Treyz
2018-07-26 10:17:53 -07:00
parent ce419f1342
commit 4e15605b5b

View File

@@ -441,8 +441,8 @@ public final class BluetoothLeScanner {
if (status == BluetoothGatt.GATT_SUCCESS) {
try {
if (mScannerId == -1) {
// Registration succeeds after timeout, unregister client.
mBluetoothGatt.unregisterClient(scannerId);
// Registration succeeds after timeout, unregister scanner.
mBluetoothGatt.unregisterScanner(scannerId);
} else {
mScannerId = scannerId;
mBluetoothGatt.startScan(mScannerId, mSettings, mFilters,