|
|
@@ -563,12 +563,12 @@ object BusinessManager {
|
|
|
) {
|
|
|
Executor.runOnMain {
|
|
|
// 如果是已经连上的设备,从indicate开始往下走,不需要再扫描了
|
|
|
-// if (BleManager.getInstance().isConnected(mac)) {
|
|
|
-// deviceList.find { it.bleDevice.mac == mac }?.let { itBleDevice ->
|
|
|
-// indicate(itBleDevice, isNeedLoading, prepareDoneCallBack)
|
|
|
-// return@runOnMain
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if (BleManager.getInstance().isConnected(mac)) {
|
|
|
+ deviceList.find { it.bleDevice.mac == mac }?.let { itBleDevice ->
|
|
|
+ indicate(itBleDevice, isNeedLoading, prepareDoneCallBack)
|
|
|
+ return@runOnMain
|
|
|
+ }
|
|
|
+ }
|
|
|
CommonUtils.checkBlePermission(activity) {
|
|
|
doScanBle(mac, isNeedLoading, prepareDoneCallBack)
|
|
|
}
|