Skip to content
Snippets Groups Projects
Commit e0b2e925 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

getSettings() util method

parent d01fe83d
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ public class VLCApplication extends Application {
public static Calendar sPlayerSleepTime = null;
private static boolean sTV;
private static SharedPreferences mSettings;
private static SharedPreferences sSettings;
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();
mSettings = PreferenceManager.getDefaultSharedPreferences(this);
sSettings = 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 || (mSettings != null && mSettings.getBoolean("tv_ui", false));
return sTV || (sSettings != null && sSettings.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 = mSettings.getString("set_locale", "");
String p = sSettings.getString("set_locale", "");
if (!p.equals("")) {
Locale locale;
// workaround due to region code
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment