Fix bug regarding setting wear location.

Closes #95
This commit is contained in:
Daniele Gobbetti 2015-08-21 15:23:48 +02:00
parent 6e80978998
commit df417e5c6c
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ public class MiBandCoordinator implements DeviceCoordinator {
public static int getWearLocation(String miBandAddress) throws IllegalArgumentException { public static int getWearLocation(String miBandAddress) throws IllegalArgumentException {
int location = 0; //left hand int location = 0; //left hand
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext()); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
if (prefs.getString(MiBandConst.PREF_MIBAND_WEARSIDE, "left") == "right") { if ("right".equals(prefs.getString(MiBandConst.PREF_MIBAND_WEARSIDE, "left"))) {
location = 1; // right hand location = 1; // right hand
} }
return location; return location;