Added a way to clear database.

This commit is contained in:
Mikunj
2019-11-21 16:31:01 +11:00
parent 76ce008063
commit f753dd1ea9
4 changed files with 43 additions and 1 deletions

View File

@@ -198,6 +198,10 @@ public class MasterSecretUtil {
return preferences.getBoolean("passphrase_initialized", false);
}
public static void clear(Context context) {
context.getSharedPreferences(PREFERENCES_NAME, 0).edit().clear().commit();
}
private static void save(Context context, String key, int value) {
if (!context.getSharedPreferences(PREFERENCES_NAME, 0)
.edit()