forked from upstream-mirrors/OpenTracks
Fix bluetooth crashes in issue 681.
This commit is contained in:
+2
-2
@@ -130,8 +130,8 @@ public class BluetoothSensorManager extends SensorManager {
|
||||
SharedPreferences prefs = context.getSharedPreferences(
|
||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||
String address =
|
||||
prefs.getString(context.getString(R.string.bluetooth_sensor_key), null);
|
||||
if (address == null) {
|
||||
prefs.getString(context.getString(R.string.bluetooth_sensor_key), "");
|
||||
if (address.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Log.w(Constants.TAG, "Connecting to bluetooth sensor: " + address);
|
||||
|
||||
Reference in New Issue
Block a user