refactor Bluetooth scan API preference

This commit is contained in:
andrekir
2022-12-12 22:00:15 -03:00
parent d74c5b6ec9
commit 0fc00b0468

View File

@@ -280,7 +280,8 @@ class BTScanModel @Inject constructor(
.launchIn(CoroutineScope(Dispatchers.Main))
if (hasBluetoothPermission) {
if (hasCompanionDeviceApi) startCompanionScan() else startClassicScan()
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S && hasCompanionDeviceApi)
startCompanionScan() else startClassicScan()
}
}