Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
530
Issue boards
Milestones
Wiki
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
823e875b
Commit
823e875b
authored
3 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Remove useless permission asking for the crash reporter
Fixes
#2130
parent
dce8ece1
No related branches found
No related tags found
1 merge request
!1059
Beta fixes
Pipeline
#124807
passed with stage
in 2 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+12
-15
12 additions, 15 deletions
...vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
with
12 additions
and
15 deletions
application/vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+
12
−
15
View file @
823e875b
...
...
@@ -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
@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
@SendCrashActivity
,
applicationContext
.
packageName
+
".provider"
,
File
(
dbZipPath
)))
if
(!
::
dbPath
.
isInitialized
)
{
val
path
=
AppContextProvider
.
appContext
.
getExternalFilesDir
(
null
)
?.
absolutePath
?:
return
@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
@SendCrashActivity
,
applicationContext
.
packageName
+
".provider"
,
File
(
dbZipPath
)))
}
val
appData
=
StringBuilder
()
try
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment