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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user