From 26c72fae89949bf0043d6e391f7de92a664c88ad Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Fri, 2 May 2025 17:02:40 +0200 Subject: [PATCH] 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. --- src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt index c594fa62..f7de7345 100644 --- a/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt +++ b/src/org/kde/kdeconnect/UserInterface/SettingsFragment.kt @@ -236,8 +236,7 @@ class SettingsFragment : PreferenceFragmentCompat() { ) { uri: Uri? -> val output = uri?.let { context?.contentResolver?.openOutputStream(uri) } ?: return@registerForActivityResult CoroutineScope(Dispatchers.IO).launch { - val pid = android.os.Process.myPid() - val process = Runtime.getRuntime().exec(arrayOf("logcat", "-d", "--pid=$pid")) + val process = Runtime.getRuntime().exec(arrayOf("logcat", "-d")) val reader = InputStreamReader(process.inputStream) output.use { it.write("KDE Connect ${BuildConfig.VERSION_NAME}\n".toByteArray(Charsets.UTF_8))