[Android] Propose sharing the logs once dumped
Nicolas Pomepuy
git at videolan.org
Mon Nov 7 14:47:55 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Nov 7 14:36:05 2022 +0100| [38dad63f100065e6b843916b9a02cfd0ce95b7d2] | committer: Nicolas Pomepuy
Propose sharing the logs once dumped
> https://code.videolan.org/videolan/vlc-android/commit/38dad63f100065e6b843916b9a02cfd0ce95b7d2
---
.../vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
index 8e3b572f8..4d59c3147 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/DebugLogActivity.kt
@@ -31,10 +31,13 @@ import androidx.core.content.getSystemService
import androidx.fragment.app.FragmentActivity
import com.google.android.material.snackbar.Snackbar
import org.videolan.libvlc.util.AndroidUtil
+import org.videolan.resources.AndroidDevices
import org.videolan.vlc.DebugLogService
import org.videolan.vlc.R
import org.videolan.vlc.gui.helpers.UiTools
import org.videolan.vlc.util.Permissions
+import org.videolan.vlc.util.share
+import java.io.File
class DebugLogActivity : FragmentActivity(), DebugLogService.Client.Callback {
private lateinit var client: DebugLogService.Client
@@ -146,9 +149,13 @@ class DebugLogActivity : FragmentActivity(), DebugLogService.Client.Callback {
override fun onSaved(success: Boolean, path: String) {
if (success) {
+ if (AndroidDevices.isAndroidTv)
Snackbar.make(logView, String.format(
getString(R.string.dump_logcat_success),
path), Snackbar.LENGTH_LONG).show()
+ else UiTools.snackerConfirm(this, String.format(getString(R.string.dump_logcat_success), path), false, R.string.share) {
+ share(File(path))
+ }
} else {
UiTools.snacker(window.decorView.findViewById(android.R.id.content), R.string.dump_logcat_failure)
}
More information about the Android
mailing list