[Android] Remove useless permission asking for the crash reporter
Nicolas Pomepuy
git at videolan.org
Mon Aug 9 06:19:39 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Aug 6 13:14:39 2021 +0200| [823e875ba3a7ac6f8f19b18691ce49c3d0d4462c] | committer: Nicolas Pomepuy
Remove useless permission asking for the crash reporter
Fixes #2130
> https://code.videolan.org/videolan/vlc-android/commit/823e875ba3a7ac6f8f19b18691ce49c3d0d4462c
---
.../src/org/videolan/vlc/gui/SendCrashActivity.kt | 27 ++++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
index bc1d8b333..d1059c7a9 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
@@ -51,7 +51,6 @@ import org.videolan.vlc.BuildConfig
import org.videolan.vlc.DebugLogService
import org.videolan.vlc.R
import org.videolan.vlc.databinding.SendCrashActivityBinding
-import org.videolan.vlc.gui.helpers.hf.StoragePermissionsDelegate.Companion.getStoragePermission
import org.videolan.vlc.util.FileUtils
import org.videolan.vlc.util.Permissions
import java.io.File
@@ -117,21 +116,19 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
//get medialib db if needed
val attachments = ArrayList<Uri>()
if (binding.includeMedialibSwitch.isChecked) {
- if (getStoragePermission(true)) {
- if (!::dbPath.isInitialized) {
- val path = AppContextProvider.appContext.getExternalFilesDir(null)?.absolutePath
- ?: return at withContext null
- dbPath = "$path/${Medialibrary.VLC_MEDIA_DB_NAME}"
- dbZipPath = "$path/db.zip"
- }
- val db = File(getDir("db", Context.MODE_PRIVATE).toString() + Medialibrary.VLC_MEDIA_DB_NAME)
- val dbFile = File(dbPath)
- FileUtils.copyFile(db, dbFile)
- FileUtils.zip(arrayOf(dbPath), dbZipPath)
- FileUtils.deleteFile(dbFile)
-
- attachments.add(FileProvider.getUriForFile(this at SendCrashActivity, applicationContext.packageName + ".provider", File(dbZipPath)))
+ if (!::dbPath.isInitialized) {
+ val path = AppContextProvider.appContext.getExternalFilesDir(null)?.absolutePath
+ ?: return at withContext null
+ dbPath = "$path/${Medialibrary.VLC_MEDIA_DB_NAME}"
+ dbZipPath = "$path/db.zip"
}
+ val db = File(getDir("db", Context.MODE_PRIVATE).toString() + Medialibrary.VLC_MEDIA_DB_NAME)
+ val dbFile = File(dbPath)
+ FileUtils.copyFile(db, dbFile)
+ FileUtils.zip(arrayOf(dbPath), dbZipPath)
+ FileUtils.deleteFile(dbFile)
+
+ attachments.add(FileProvider.getUriForFile(this at SendCrashActivity, applicationContext.packageName + ".provider", File(dbZipPath)))
}
val appData = StringBuilder()
try {
More information about the Android
mailing list