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

Commit 7f78ff2d authored by Charlie Boutier's avatar Charlie Boutier Committed by Gerrit Code Review
Browse files

Merge "PandoraServer: support extended scanning" into main

parents a8f0a078 69e28691
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.bluetooth.le.AdvertisingSetParameters
import android.bluetooth.le.ScanCallback
import android.bluetooth.le.ScanRecord
import android.bluetooth.le.ScanResult
import android.bluetooth.le.ScanSettings
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
@@ -789,7 +790,8 @@ class Host(
                            error("scan failed")
                        }
                    }
                bluetoothAdapter.bluetoothLeScanner.startScan(callback)
                val scanSettings = ScanSettings.Builder().setLegacy(request.legacy).build()
                bluetoothAdapter.bluetoothLeScanner.startScan(null, scanSettings, callback)

                awaitClose { bluetoothAdapter.bluetoothLeScanner.stopScan(callback) }
            }