1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

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

View File

@ -120,7 +120,7 @@ public class MiBandCoordinator implements DeviceCoordinator {
public static int getWearLocation(String miBandAddress) throws IllegalArgumentException {
int location = 0; //left hand
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
}
return location;