mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-03 23:32:28 -08:00
Password characters in settings
This commit is contained in:
1 parent
b6721b32e7
commit
f6b04dff24
7 files changed
+138
-19
No files matched your search
@@ -25,6 +25,10 @@ import android.preference.PreferenceManager;
|
||||
|
||||
import com.kunzisoft.keepass.R;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class PrefsUtil {
|
||||
|
||||
public static float getListTextSize(Context ctx) {
|
||||
@@ -37,4 +41,12 @@ public class PrefsUtil {
|
||||
return prefs.getInt(ctx.getString(R.string.password_length_key),
|
||||
Integer.parseInt(ctx.getString(R.string.default_password_length)));
|
||||
}
|
||||
|
||||
public static Set<String> getDefaultPasswordCharacters(Context ctx) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
return prefs.getStringSet(ctx.getString(R.string.list_password_generator_options_key),
|
||||
new HashSet<>(Arrays.asList(
|
||||
ctx.getResources()
|
||||
.getStringArray(R.array.list_password_generator_options_default_values))));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user