From 533d7babfc499c7db8402be69833de8a878fd145 Mon Sep 17 00:00:00 2001 From: Mohamed Zenadi Date: Tue, 9 Jun 2015 23:53:45 +0200 Subject: use apply rather than commit --- app/src/main/java/com/zeapo/pwdstore/UserPreference.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java index e143c57c..437333ac 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java @@ -108,7 +108,7 @@ public class UserPreference extends AppCompatActivity { //TODO Handle the diffent cases of exceptions } - sharedPreferences.edit().putBoolean("repository_initialized", false).commit(); + sharedPreferences.edit().putBoolean("repository_initialized", false).apply(); dialogInterface.cancel(); callingActivity.finish(); } -- cgit v1.2.3