mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Do not filter logs by PID
So we can see crashes in previous sessions of the app. Also, Android only lets apps see their own logs anyway (at least in recent versions), so there should be no privacy concerns from someone sharing those logs.
This commit is contained in:
@@ -236,8 +236,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||||||
) { uri: Uri? ->
|
) { uri: Uri? ->
|
||||||
val output = uri?.let { context?.contentResolver?.openOutputStream(uri) } ?: return@registerForActivityResult
|
val output = uri?.let { context?.contentResolver?.openOutputStream(uri) } ?: return@registerForActivityResult
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
val pid = android.os.Process.myPid()
|
val process = Runtime.getRuntime().exec(arrayOf("logcat", "-d"))
|
||||||
val process = Runtime.getRuntime().exec(arrayOf("logcat", "-d", "--pid=$pid"))
|
|
||||||
val reader = InputStreamReader(process.inputStream)
|
val reader = InputStreamReader(process.inputStream)
|
||||||
output.use {
|
output.use {
|
||||||
it.write("KDE Connect ${BuildConfig.VERSION_NAME}\n".toByteArray(Charsets.UTF_8))
|
it.write("KDE Connect ${BuildConfig.VERSION_NAME}\n".toByteArray(Charsets.UTF_8))
|
||||||
|
Reference in New Issue
Block a user