From e6f16fce50461678e69103ba9c39710a6f052b30 Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Sun, 6 Nov 2016 19:55:45 +0100 Subject: [PATCH] Suppressed unfixable warnings on clearPodSettings and clearAppSettings. --- .../dfa/diaspora_android/util/AppSettings.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java b/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java index 9cd1f6a2..35a88b19 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java @@ -49,10 +49,24 @@ public class AppSettings { return context; } + /** + * Clear all settings in prefPod (Settings related to the configured pod) + * This uses commit instead of apply, since + * SettingsActivity.SettingsFragmentDebugging.showWipeSettingsDialog() + * kills the app after the calling this, so we have to block until we are finished. + */ + @SuppressLint("CommitPrefEdits") public void clearPodSettings() { prefPod.edit().clear().commit(); } + /** + * Clear all settings in prefApp (related to the App itself) + * This uses commit instead of apply, since + * SettingsActivity.SettingsFragmentDebugging.showWipeSettingsDialog() + * kills the app after the calling this, so we have to block until we are finished. + */ + @SuppressLint("CommitPrefEdits") public void clearAppSettings() { prefApp.edit().clear().commit(); }