Fix bluetooth crashes in issue 681.

This commit is contained in:
Jimmy Shih
2011-12-21 17:37:34 -08:00
parent 34c273be7a
commit 28ce9a1656
2 changed files with 3 additions and 3 deletions
@@ -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);