Commit f52da08f authored by y0no's avatar y0no

Fix crash issue

parent 4980b2f7
......@@ -99,7 +99,7 @@ public class BtScanner {
deviceInfo = m_oDetectedDevices.get(device.getAddress());
deviceInfo.setM_lLastSeen(timestamp);
deviceInfo.setM_iRssi(rssi);
if(!deviceInfo.getDeviceName().equals(device.getName())) {
if(deviceInfo.getDeviceName() == null || !deviceInfo.getDeviceName().equals(device.getName())) {
deviceInfo.setM_oDevice(device);
}
}
......
......@@ -51,7 +51,10 @@ public class FingerprintMgr {
Log.d(TAG, m_oSignatures.toString());
// Add signature to text file
String sigFile = String.format("%s;%s;%s",name, signature.getType(), signature.getName());
String devName = signature.getName();
if (devName == null)
devName = "Unknown";
String sigFile = String.format("%s;%s;%s",name, signature.getType(), devName);
FileLog.write("signature.txt", sigFile,NewBtLE.getContext());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment