|
@@ -83,9 +83,9 @@ public class BleScanWork {
|
|
|
sb.append(BLEUtility.IntToHex2(b & UnsignedBytes.MAX_VALUE));
|
|
|
}
|
|
|
String deviceName = getDeviceName(scanResult);
|
|
|
- if (deviceName != null && !deviceName.isEmpty() && scanResult.getRssi() >= -75 && scanResult.getRssi() < 127 && BleScanWork.this.update(scanResult.getDevice(), scanResult.getRssi(), deviceName, valueAt) && BleScanWork.mScannedDeviceList.size() > 0 && BleScanWork.mSuccess != null) {
|
|
|
- EPLog.e("mScannedDeviceList --- " + BleScanWork.mScannedDeviceList.size());
|
|
|
- BleScanWork.mSuccess.call(BleScanWork.mScannedDeviceList);
|
|
|
+ if (deviceName != null && !deviceName.isEmpty() && scanResult.getRssi() >= -75 && scanResult.getRssi() < 127 && this.update(scanResult.getDevice(), scanResult.getRssi(), deviceName, valueAt) && mScannedDeviceList.size() > 0 && mSuccess != null) {
|
|
|
+ EPLog.e("mScannedDeviceList --- " + mScannedDeviceList.size());
|
|
|
+ mSuccess.call(mScannedDeviceList);
|
|
|
return;
|
|
|
}
|
|
|
return;
|
|
@@ -121,14 +121,14 @@ public class BleScanWork {
|
|
|
sb3.append(BLEUtility.IntToHex2(bArr[i4] & UnsignedBytes.MAX_VALUE));
|
|
|
}
|
|
|
}
|
|
|
- if (BleScanWork.mIsFiltering && BLEUuid.SERVICE_SNMP.replace("-", "").equalsIgnoreCase(sb.toString()) && i >= -75 && i < 127) {
|
|
|
+ if (mIsFiltering && BLEUuid.SERVICE_SNMP.replace("-", "").equalsIgnoreCase(sb.toString()) && i >= -75 && i < 127) {
|
|
|
String name = bluetoothDevice.getName();
|
|
|
byte[] bArr2 = new byte[3];
|
|
|
System.arraycopy(bArr, 7, bArr2, 0, bArr2.length);
|
|
|
EPLog.d(name + " Company information = " + sb2 + " getManufacturerSpecificData = " + sb3);
|
|
|
- if (BleScanWork.this.update(bluetoothDevice, i, name, bArr2) && BleScanWork.mSuccess != null && name != null) {
|
|
|
- EPLog.e("mScannedDeviceList --- " + BleScanWork.mScannedDeviceList.size());
|
|
|
- BleScanWork.mSuccess.call(BleScanWork.mScannedDeviceList);
|
|
|
+ if (this.update(bluetoothDevice, i, name, bArr2) && mSuccess != null && name != null) {
|
|
|
+ EPLog.e("mScannedDeviceList --- " + mScannedDeviceList.size());
|
|
|
+ mSuccess.call(mScannedDeviceList);
|
|
|
}
|
|
|
}
|
|
|
}
|