diff options
author | Torsten Grote <t@grobox.de> | 2020-09-07 13:41:12 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-09-07 13:41:12 -0300 |
commit | 663d264bf18d4af84553d969fd85e782d94faa41 (patch) | |
tree | c3e427b7863d0e68b619603cf732bbf3ad09a89b /taler-kotlin-android/src | |
parent | d78c2003df1db7af448de1c91449201020109190 (diff) | |
download | taler-android-663d264bf18d4af84553d969fd85e782d94faa41.tar.gz taler-android-663d264bf18d4af84553d969fd85e782d94faa41.tar.bz2 taler-android-663d264bf18d4af84553d969fd85e782d94faa41.zip |
[wallet] add logcat viewer to dev settings
Diffstat (limited to 'taler-kotlin-android/src')
-rw-r--r-- | taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt | 10 |
1 files changed, 10 insertions, 0 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 ceb5ead..72740df 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 @@ -43,6 +43,9 @@ import androidx.core.content.ContextCompat.getSystemService import androidx.fragment.app.Fragment import androidx.navigation.NavDirections import androidx.navigation.fragment.findNavController +import com.github.pedrovgs.lynx.LynxActivity +import com.github.pedrovgs.lynx.LynxConfig +import com.github.pedrovgs.lynx.model.TraceLevel import net.taler.lib.common.Version fun View.fadeIn(endAction: () -> Unit = {}) { @@ -90,6 +93,13 @@ fun Context.isOnline(): Boolean { } } +fun Context.showLogViewer() { + val lynxActivityIntent = LynxActivity.getIntent(this, LynxConfig().apply { + maxNumberOfTracesToShow = 1500 // higher numbers seem to break share functionality + }) + startActivity(lynxActivityIntent) +} + fun Intent.isSafe(context: Context): Boolean { return context.packageManager.queryIntentActivities(this, MATCH_DEFAULT_ONLY).isNotEmpty() } |