Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
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
277b233c
Commit
277b233c
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Save crash/log files in VLC directories
Do not flood external storage root anymore
parent
bb2e7525
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/VLCCrashHandler.java
+10
-11
10 additions, 11 deletions
vlc-android/src/org/videolan/vlc/VLCCrashHandler.java
with
10 additions
and
11 deletions
vlc-android/src/org/videolan/vlc/VLCCrashHandler.java
+
10
−
11
View file @
277b233c
...
...
@@ -20,6 +20,13 @@
package
org.videolan.vlc
;
import
android.os.Environment
;
import
android.text.format.DateFormat
;
import
android.util.Log
;
import
org.videolan.vlc.util.Logcat
;
import
org.videolan.vlc.util.Util
;
import
java.io.BufferedWriter
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
...
...
@@ -30,14 +37,6 @@ import java.io.StringWriter;
import
java.io.Writer
;
import
java.lang.Thread.UncaughtExceptionHandler
;
import
org.videolan.vlc.util.AndroidDevices
;
import
org.videolan.vlc.util.Logcat
;
import
org.videolan.vlc.util.Util
;
import
android.os.Environment
;
import
android.text.format.DateFormat
;
import
android.util.Log
;
public
class
VLCCrashHandler
implements
UncaughtExceptionHandler
{
private
static
final
String
TAG
=
"VLC/VlcCrashHandler"
;
...
...
@@ -69,9 +68,9 @@ public class VLCCrashHandler implements UncaughtExceptionHandler {
Log
.
e
(
TAG
,
stacktrace
);
// Save the log on SD card if available
if
(
Environment
.
getExternalStorageState
().
equals
(
Environment
.
MEDIA_MOUNTED
))
{
writeLog
(
stacktrace
,
AndroidDevices
.
EXTERNAL_PUBLIC_DIRECTORY
+
"/vlc_crash"
);
writeLogcat
(
AndroidDevices
.
EXTERNAL_PUBLIC_DIRECTORY
+
"/vlc_logcat"
);
if
(
Environment
.
getExternalStorageState
().
equals
(
Environment
.
MEDIA_MOUNTED
))
{
writeLog
(
stacktrace
,
VLCApplication
.
getAppContext
().
getExternalFilesDir
(
null
).
getAbsolutePath
()+
"/vlc_crash"
);
writeLogcat
(
VLCApplication
.
getAppContext
().
getExternalFilesDir
(
null
).
getAbsolutePath
()+
"/vlc_logcat"
);
}
defaultUEH
.
uncaughtException
(
thread
,
ex
);
...
...
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