From 86d0c35ea97313d41f668f40dcbba38cfc8108d8 Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Sun, 17 Mar 2024 19:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=C2=B7=E5=BF=AB=E6=8D=B7=E6=8C=87=E4=BB=A4=20?= =?UTF-8?q?=E2=80=94=E2=80=94=20=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=EF=BC=9A=E8=93=9D=E7=89=99=E8=AE=BE=E5=A4=87=EF=BC=88=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=98=E5=8C=96=E3=80=81=E8=AE=BE=E5=A4=87=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E3=80=81=E8=BF=9E=E6=8E=A5=E6=96=AD=E5=BC=80=EF=BC=89?= =?UTF-8?q?=20#388?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/idormy/sms/forwarder/service/BluetoothScanService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/idormy/sms/forwarder/service/BluetoothScanService.kt b/app/src/main/java/com/idormy/sms/forwarder/service/BluetoothScanService.kt index b21eff0f..e327cb6c 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/service/BluetoothScanService.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/service/BluetoothScanService.kt @@ -11,6 +11,7 @@ import com.idormy.sms.forwarder.utils.ACTION_RESTART import com.idormy.sms.forwarder.utils.ACTION_START import com.idormy.sms.forwarder.utils.ACTION_STOP import com.idormy.sms.forwarder.utils.Log +import com.idormy.sms.forwarder.utils.task.TaskUtils @Suppress("PrivatePropertyName", "DEPRECATION") class BluetoothScanService : Service() { @@ -47,6 +48,8 @@ class BluetoothScanService : Service() { return } if (isRunning) return + // 清空已发现设备 + TaskUtils.discoveredDevices = mutableMapOf() bluetoothAdapter?.startDiscovery() isRunning = true }