2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +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:
Albert Vaca Cintora 2025-05-02 17:02:40 +02:00
parent b981f9234b
commit 26c72fae89
No known key found for this signature in database

View File

@ -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))