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
15
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
77299ec1
Commit
77299ec1
authored
5 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Fix sending db in crash sender
parent
fdc3db0d
No related branches found
No related tags found
1 merge request
!250
Fix sending db in crash sender
Pipeline
#9462
passed with stage
in 27 minutes and 15 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+6
-8
6 additions, 8 deletions
vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
with
6 additions
and
8 deletions
vlc-android/src/org/videolan/vlc/gui/SendCrashActivity.kt
+
6
−
8
View file @
77299ec1
...
...
@@ -82,9 +82,10 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
client
.
stop
()
FileUtils
.
zip
(
arrayOf
(
path
),
logcatZipPath
)
val
emailIntent
=
Intent
(
Intent
.
ACTION_SEND
)
val
emailIntent
=
Intent
(
Intent
.
ACTION_SEND
_MULTIPLE
)
emailIntent
.
type
=
"message/rfc822"
//get medialib db if needed
val
attachments
=
ArrayList
<
Uri
>()
if
(
binding
.
includeMedialibSwitch
.
isChecked
)
{
if
(
Permissions
.
canWriteStorage
())
{
val
db
=
File
(
getDir
(
"db"
,
Context
.
MODE_PRIVATE
).
toString
()
+
AbstractMedialibrary
.
VLC_MEDIA_DB_NAME
)
...
...
@@ -94,9 +95,7 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
FileUtils
.
zip
(
arrayOf
(
dbPath
),
dbZipPath
)
FileUtils
.
deleteFile
(
dbFile
)
val
dbUri
=
FileProvider
.
getUriForFile
(
this
,
applicationContext
.
packageName
+
".provider"
,
File
(
dbZipPath
))
emailIntent
.
putExtra
(
Intent
.
EXTRA_STREAM
,
dbUri
)
emailIntent
.
type
=
"application/zip"
attachments
.
add
(
FileProvider
.
getUriForFile
(
this
,
applicationContext
.
packageName
+
".provider"
,
File
(
dbZipPath
)))
}
}
val
appData
=
StringBuilder
()
...
...
@@ -111,11 +110,11 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
appData
.
append
(
"System name: ${Build.DISPLAY}<br/>"
)
appData
.
append
(
"Memory free: ${AppUtils.freeMemory().readableFileSize()} on ${AppUtils.totalMemory().readableFileSize()}"
)
val
logcatUri
=
FileProvider
.
getUriForFile
(
this
,
applicationContext
.
packageName
+
".provider"
,
File
(
logcatZipPath
))
emailIntent
.
putExtra
(
Intent
.
EXTRA_STREAM
,
logcatUri
)
attachments
.
add
(
FileProvider
.
getUriForFile
(
this
,
applicationContext
.
packageName
+
".provider"
,
File
(
logcatZipPath
))
)
emailIntent
.
putExtra
(
Intent
.
EXTRA_STREAM
,
attachments
)
emailIntent
.
type
=
"application/zip"
val
describeCrash
=
getString
(
R
.
string
.
describe_crash
)
val
describeCrash
=
getString
(
org
.
videolan
.
vlc
.
R
.
string
.
describe_crash
)
val
body
=
"<p>Here are my crash logs for VLC</strong></p><p style=3D\"color:#16171A;\"> [$describeCrash]</p><p>$appData</p>"
val
htmlBody
=
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
N
)
Html
.
fromHtml
(
body
,
HtmlCompat
.
FROM_HTML_MODE_LEGACY
)
else
Html
.
fromHtml
(
body
)
...
...
@@ -162,5 +161,4 @@ class SendCrashActivity : AppCompatActivity(), DebugLogService.Client.Callback {
if
(
::
client
.
isInitialized
)
client
.
release
()
super
.
onDestroy
()
}
}
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
812a1974
·
5 years ago
mentioned in commit
812a1974
mentioned in commit 812a1974422a42c419ad862e53e3f1f9ed2504bf
Toggle commit list
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