From 1cdcf19d0120a0d7fe509a515ea945e54ad5f7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4ttgen?= Date: Wed, 10 Oct 2018 21:08:16 +0200 Subject: [PATCH] Made key slots preference only visible in debug mode Closes 21 --- app/src/main/java/me/impy/aegis/ui/PreferencesFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/me/impy/aegis/ui/PreferencesFragment.java b/app/src/main/java/me/impy/aegis/ui/PreferencesFragment.java index f074e031..664fd631 100644 --- a/app/src/main/java/me/impy/aegis/ui/PreferencesFragment.java +++ b/app/src/main/java/me/impy/aegis/ui/PreferencesFragment.java @@ -25,6 +25,7 @@ import java.util.Map; import javax.crypto.Cipher; import me.impy.aegis.AegisApplication; +import me.impy.aegis.BuildConfig; import me.impy.aegis.R; import me.impy.aegis.db.DatabaseEntry; import me.impy.aegis.db.DatabaseFileCredentials; @@ -172,6 +173,11 @@ public class PreferencesFragment extends PreferenceFragmentCompat implements Pas }); _slotsPreference = findPreference("pref_slots"); + if (BuildConfig.DEBUG) { + _slotsPreference.setVisible(true); + } else { + _slotsPreference.setVisible(false); + } _slotsPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) {