diff options
author | Torsten Grote <t@grobox.de> | 2020-09-09 13:38:30 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-09-09 13:38:30 -0300 |
commit | 969f847504d7e8d6d7fe705607ea02a0e584506b (patch) | |
tree | a7ae48bf987076f937f3d4f0033f6fda787b9316 | |
parent | f838c4613a6f345a4e81c2965b63dfa0626e3d1f (diff) | |
download | taler-android-969f847504d7e8d6d7fe705607ea02a0e584506b.tar.gz taler-android-969f847504d7e8d6d7fe705607ea02a0e584506b.tar.bz2 taler-android-969f847504d7e8d6d7fe705607ea02a0e584506b.zip |
[wallet] improve log viewer by not updating it and pre-filtering
-rw-r--r-- | taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt | 4 | ||||
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt index 093194f..4ac2e73 100644 --- a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt +++ b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt @@ -96,9 +96,11 @@ fun Context.isOnline(): Boolean { } } -fun Context.showLogViewer() { +fun Context.showLogViewer(logFilter: String? = null) { val lynxActivityIntent = LynxActivity.getIntent(this, LynxConfig().apply { maxNumberOfTracesToShow = 1500 // higher numbers seem to break share functionality + samplingRate = Int.MAX_VALUE // no updates please + logFilter?.let { filter = it } }) startActivity(lynxActivityIntent) } diff --git a/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt b/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt index b321061..d2f30aa 100644 --- a/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/settings/SettingsFragment.kt @@ -108,7 +108,7 @@ class SettingsFragment : PreferenceFragmentCompat() { } prefLogcat.setOnPreferenceClickListener { - requireContext().showLogViewer() + requireContext().showLogViewer("taler-wallet") true } |