Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Casanowow Life for love
VLC-Android
Commits
14b14166
Commit
14b14166
authored
Aug 12, 2012
by
Edward Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't leave the user hanging if LibVLC couldn't be initialized
parent
20303401
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+10
-3
No files found.
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
View file @
14b14166
...
...
@@ -134,18 +134,25 @@ public class MainActivity extends SherlockFragmentActivity {
listView
.
setBackgroundColor
(
Color
.
parseColor
(
"#1f3f61"
));
mMenu
.
setViewBehind
(
sidebar
);
super
.
onCreate
(
savedInstanceState
);
/* Get settings */
mSettings
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
LibVLC
.
useIOMX
(
this
);
try
{
// Start
l
ib
vlc
// Start
L
ib
VLC
LibVLC
.
getInstance
();
}
catch
(
LibVlcException
e
)
{
e
.
printStackTrace
();
super
.
onCreate
(
null
);
Intent
i
=
new
Intent
(
this
,
CompatErrorActivity
.
class
);
i
.
putExtra
(
"runtimeError"
,
true
);
i
.
putExtra
(
"message"
,
"LibVLC failed to initialize (LibVlcException)"
);
startActivity
(
i
);
finish
();
return
;
}
super
.
onCreate
(
savedInstanceState
);
/* Initialize variables */
mInfoLayout
=
v_main
.
findViewById
(
R
.
id
.
info_layout
);
mInfoProgress
=
(
ProgressBar
)
v_main
.
findViewById
(
R
.
id
.
info_progress
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment