Pro debugging

This commit is contained in:
M66B
2018-09-17 06:15:54 +00:00
parent 2cab6e2618
commit a7b8fb69ca
8 changed files with 18 additions and 15 deletions

View File

@@ -35,10 +35,9 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
protected void onCreate(Bundle savedInstanceState) {
Log.i(Helper.TAG, "Create " + this.getClass().getName() + " version=" + BuildConfig.VERSION_NAME);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean pro = prefs.getBoolean("pro", false);
String theme = (pro ? prefs.getString("theme", "light") : "light");
String theme = (Helper.isPro(this) ? prefs.getString("theme", "light") : "light");
setTheme("light".equals(theme) ? R.style.AppThemeLight : R.style.AppThemeDark);
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
prefs.registerOnSharedPreferenceChangeListener(this);
super.onCreate(savedInstanceState);
}