Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Fix logcat missing -v before android N
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Jan 16, 2022
1 parent 8710e2f commit 8f64811
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions app/src/main/java/io/nekohasekai/sagernet/ui/LogcatFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package io.nekohasekai.sagernet.ui
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Typeface
import android.os.Build
import android.os.Bundle
import android.view.*
import androidx.appcompat.widget.Toolbar
Expand Down Expand Up @@ -93,28 +94,30 @@ class LogcatFragment : ToolbarFragment(R.layout.layout_logcat),
terminalView.mTermSession?.also {
it.finishIfRunning()
}
val args = mutableListOf(
"-C",
"-v",
"tag,color",
)
val args = mutableListOf("-C")

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
args += arrayOf(
"-v",
"tag,color",
)
}

if (!isExpert) {
args.addAll(
arrayOf(
"AndroidRuntime:D",
"ProxyInstance:D",
"GuardedProcessPool:D",
"VpnService:D",
"libcore:D",
"v2ray-core:D",
"su:D",
"libtrojan:D",
"libnaive:D",
"libbrook:D",
"libhysteria:D",
"librelaybaton:D",
"*:E",
)
args += arrayOf(
"AndroidRuntime:D",
"ProxyInstance:D",
"GuardedProcessPool:D",
"VpnService:D",
"libcore:D",
"v2ray-core:D",
"su:D",
"libtrojan:D",
"libnaive:D",
"libbrook:D",
"libhysteria:D",
"librelaybaton:D",
"*:E",
)
}

Expand Down

0 comments on commit 8f64811

Please sign in to comment.