diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java index 37de052ab..35c96f444 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/AbstractDeviceCoordinator.java @@ -75,11 +75,13 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator { Prefs prefs = getPrefs(); String lastDevice = prefs.getPreferences().getString("last_device_address",""); if (gbDevice.getAddress() == lastDevice){ - prefs.getPreferences().edit().remove("last_device_address"); + LOG.debug("#1605 removing last device"); + prefs.getPreferences().edit().remove("last_device_address").apply(); } String macAddress = prefs.getPreferences().getString(MiBandConst.PREF_MIBAND_ADDRESS,""); if (gbDevice.getAddress() == macAddress){ - prefs.getPreferences().edit().remove(MiBandConst.PREF_MIBAND_ADDRESS); + LOG.debug("#1605 removing devel miband"); + prefs.getPreferences().edit().remove(MiBandConst.PREF_MIBAND_ADDRESS).apply(); } try (DBHandler dbHandler = GBApplication.acquireDB()) { DaoSession session = dbHandler.getDaoSession();