forked from upstream-mirrors/OpenTracks
Fix bug. String.isEmpty is only available in api 9 or higher.
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ public class BluetoothSensorManager extends SensorManager {
|
|||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
String address =
|
String address =
|
||||||
prefs.getString(context.getString(R.string.bluetooth_sensor_key), "");
|
prefs.getString(context.getString(R.string.bluetooth_sensor_key), "");
|
||||||
if (address.isEmpty()) {
|
if (address == null || address.equals("")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.w(Constants.TAG, "Connecting to bluetooth sensor: " + address);
|
Log.w(Constants.TAG, "Connecting to bluetooth sensor: " + address);
|
||||||
|
|||||||
Reference in New Issue
Block a user