diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index fea57559d..e92c7fd80 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -322,6 +322,10 @@ public class AppPrefs { } public void changeLock(InPlaceSecretValue newLockPw) { + if (lockCrypt.get() == null && newLockPw == null) { + return; + } + if (newLockPw == null) { lockPassword.setValue(null); lockCrypt.setValue(null); diff --git a/app/src/main/java/io/xpipe/app/storage/DataStorage.java b/app/src/main/java/io/xpipe/app/storage/DataStorage.java index 922d5b962..fb94ac616 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStorage.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStorage.java @@ -119,7 +119,7 @@ public abstract class DataStorage { }); } - private synchronized void dispose() { + private void dispose() { save(true); }