Fix bug. String.isEmpty is only available in api 9 or higher.

This commit is contained in:
Jimmy Shih
2011-12-22 16:29:05 -08:00
parent b86c9b3867
commit 9a220fade9
@@ -131,7 +131,7 @@ public class BluetoothSensorManager extends SensorManager {
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
String address =
prefs.getString(context.getString(R.string.bluetooth_sensor_key), "");
if (address.isEmpty()) {
if (address == null || address.equals("")) {
return;
}
Log.w(Constants.TAG, "Connecting to bluetooth sensor: " + address);