mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-03 15:55:14 +00:00
Add toggle for debug logging (#745)
This commit is contained in:
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Settings option to enable debug logging
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- SSH Keygen UI was improved
|
- SSH Keygen UI was improved
|
||||||
- Default key length for SSH Keygen is now 4096 bits
|
- Default key length for SSH Keygen is now 4096 bits
|
||||||
|
@@ -21,11 +21,11 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
if (BuildConfig.ENABLE_DEBUG_FEATURES) {
|
prefs = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
if (BuildConfig.ENABLE_DEBUG_FEATURES || prefs?.getBoolean("enable_debug_logging", false) == true) {
|
||||||
plant(DebugTree())
|
plant(DebugTree())
|
||||||
WhatTheStack(this).init()
|
WhatTheStack(this).init()
|
||||||
}
|
}
|
||||||
prefs = PreferenceManager.getDefaultSharedPreferences(this)
|
|
||||||
prefs?.registerOnSharedPreferenceChangeListener(this)
|
prefs?.registerOnSharedPreferenceChangeListener(this)
|
||||||
setNightMode()
|
setNightMode()
|
||||||
}
|
}
|
||||||
|
@@ -282,6 +282,8 @@ class UserPreference : AppCompatActivity() {
|
|||||||
getString(R.string.pref_clipboard_timeout_summary, sharedPreferences.getString("general_show_time", "45"))
|
getString(R.string.pref_clipboard_timeout_summary, sharedPreferences.getString("general_show_time", "45"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
findPreference<CheckBoxPreference>("enable_debug_logging")?.isVisible = !BuildConfig.ENABLE_DEBUG_FEATURES
|
||||||
|
|
||||||
findPreference<CheckBoxPreference>("biometric_auth")?.apply {
|
findPreference<CheckBoxPreference>("biometric_auth")?.apply {
|
||||||
val isFingerprintSupported = BiometricManager.from(requireContext()).canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS
|
val isFingerprintSupported = BiometricManager.from(requireContext()).canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS
|
||||||
if (!isFingerprintSupported) {
|
if (!isFingerprintSupported) {
|
||||||
|
@@ -367,4 +367,6 @@
|
|||||||
<string name="autofill_onboarding_dialog_title">New, revamped Autofill!</string>
|
<string name="autofill_onboarding_dialog_title">New, revamped Autofill!</string>
|
||||||
<string name="autofill_onboarding_dialog_message">In this release, Autofill support has been massively improved with advanced features like anti-phishing protection and enhanced reliability. If you have been holding out on using it because of the shortcomings on the previous version, you\'ll likely love the new iteration. Give it a shot!</string>
|
<string name="autofill_onboarding_dialog_message">In this release, Autofill support has been massively improved with advanced features like anti-phishing protection and enhanced reliability. If you have been holding out on using it because of the shortcomings on the previous version, you\'ll likely love the new iteration. Give it a shot!</string>
|
||||||
<string name="snackbar_action_grant">Grant</string>
|
<string name="snackbar_action_grant">Grant</string>
|
||||||
|
<string name="pref_debug_logging_summary">Enable debug logging (requires app restart)</string>
|
||||||
|
<string name="pref_debug_logging_title">Debug logging</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -172,6 +172,11 @@
|
|||||||
app:key="clear_clipboard_20x"
|
app:key="clear_clipboard_20x"
|
||||||
app:summary="@string/pref_clear_clipboard_hint"
|
app:summary="@string/pref_clear_clipboard_hint"
|
||||||
app:title="@string/pref_clear_clipboard_title" />
|
app:title="@string/pref_clear_clipboard_title" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:key="enable_debug_logging"
|
||||||
|
app:summary="@string/pref_debug_logging_summary"
|
||||||
|
app:title="@string/pref_debug_logging_title" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory>
|
||||||
|
Reference in New Issue
Block a user