Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
532
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
e0b2e925
Commit
e0b2e925
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
getSettings() util method
parent
d01fe83d
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/VLCApplication.java
+8
-4
8 additions, 4 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
with
8 additions
and
4 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
+
8
−
4
View file @
e0b2e925
...
...
@@ -68,7 +68,7 @@ public class VLCApplication extends Application {
public
static
Calendar
sPlayerSleepTime
=
null
;
private
static
boolean
sTV
;
private
static
SharedPreferences
m
Settings
;
private
static
SharedPreferences
s
Settings
;
private
static
SimpleArrayMap
<
String
,
WeakReference
<
Object
>>
sDataMap
=
new
SimpleArrayMap
<>();
...
...
@@ -92,7 +92,7 @@ public class VLCApplication extends Application {
public
void
onCreate
()
{
instance
=
this
;
super
.
onCreate
();
m
Settings
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
s
Settings
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
setLocale
();
...
...
@@ -159,8 +159,12 @@ public class VLCApplication extends Application {
return
instance
.
getResources
();
}
public
static
SharedPreferences
getSettings
()
{
return
sSettings
;
}
public
static
boolean
showTvUi
()
{
return
sTV
||
(
m
Settings
!=
null
&&
m
Settings
.
getBoolean
(
"tv_ui"
,
false
));
return
sTV
||
(
s
Settings
!=
null
&&
s
Settings
.
getBoolean
(
"tv_ui"
,
false
));
}
public
static
void
runBackground
(
Runnable
runnable
)
{
...
...
@@ -244,7 +248,7 @@ public class VLCApplication extends Application {
public
static
void
setLocale
(){
// Are we using advanced debugging - locale?
String
p
=
m
Settings
.
getString
(
"set_locale"
,
""
);
String
p
=
s
Settings
.
getString
(
"set_locale"
,
""
);
if
(!
p
.
equals
(
""
))
{
Locale
locale
;
// workaround due to region code
...
...
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