mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 17:41:57 +01:00
add .apply()
This commit is contained in:
parent
975b698564
commit
cf28ee48f4
@ -75,11 +75,13 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
|||||||
Prefs prefs = getPrefs();
|
Prefs prefs = getPrefs();
|
||||||
String lastDevice = prefs.getPreferences().getString("last_device_address","");
|
String lastDevice = prefs.getPreferences().getString("last_device_address","");
|
||||||
if (gbDevice.getAddress() == lastDevice){
|
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,"");
|
String macAddress = prefs.getPreferences().getString(MiBandConst.PREF_MIBAND_ADDRESS,"");
|
||||||
if (gbDevice.getAddress() == macAddress){
|
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()) {
|
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||||
DaoSession session = dbHandler.getDaoSession();
|
DaoSession session = dbHandler.getDaoSession();
|
||||||
|
Loading…
Reference in New Issue
Block a user