Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
6568a711
Commit
6568a711
authored
Jul 18, 2014
by
Jean-Baptiste Kempf
Browse files
Preferences: prevent potential NullDereference
parent
a773ddfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
View file @
6568a711
...
...
@@ -39,6 +39,7 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences.OnSharedPreferenceChangeListener
;
import
android.graphics.drawable.Drawable.ConstantState
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.preference.CheckBoxPreference
;
...
...
@@ -303,10 +304,11 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
Dialog
dialog
=
((
PreferenceScreen
)
preference
).
getDialog
();
if
(
dialog
!=
null
)
{
Window
window
=
dialog
.
getWindow
();
if
(
window
!=
null
)
window
.
getDecorView
().
setBackgroundDrawable
(
this
.
getWindow
().
getDecorView
().
getBackground
()
.
getConstantState
().
newDrawable
());
if
(
window
!=
null
)
{
ConstantState
state
=
this
.
getWindow
().
getDecorView
().
getBackground
().
getConstantState
();
if
(
state
!=
null
)
window
.
getDecorView
().
setBackgroundDrawable
(
state
.
newDrawable
());
}
}
}
}
catch
(
Exception
e
){}
...
...
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