Fixed abrupt crash if BLE address is empty string, and created testing version of V3.5.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="72"
|
||||
android:versionName="3.5.0">
|
||||
android:versionName="3.5.0a">
|
||||
<!-- android:allowBackup="false" -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
||||
@@ -149,7 +149,13 @@ public class SdDataSourceBLE extends SdDataSource {
|
||||
return;
|
||||
}
|
||||
|
||||
final BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(mBleDeviceAddr);
|
||||
BluetoothDevice device;
|
||||
try {
|
||||
device = mBluetoothAdapter.getRemoteDevice(mBleDeviceAddr);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "bleConnect(): Error connecting to device address "+mBleDeviceAddr+".");
|
||||
device = null;
|
||||
}
|
||||
if (device == null) {
|
||||
Log.w(TAG, "bleConnect(): Device not found. Unable to connect.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user