|
|
|
@ -72,6 +72,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|
|
|
|
this.contacts = hasPermission(Manifest.permission.READ_CONTACTS);
|
|
|
|
|
|
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
|
|
|
|
|
|
|
|
|
if (!this.getClass().equals(ActivityMain.class)) {
|
|
|
|
|
String theme = prefs.getString("theme", null);
|
|
|
|
|
if ("system".equals(theme)) {
|
|
|
|
|
int uiMode = getResources().getConfiguration().uiMode;
|
|
|
|
@ -83,6 +85,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|
|
|
|
setTheme(R.style.AppThemeDark);
|
|
|
|
|
else if ("black".equals(theme))
|
|
|
|
|
setTheme(R.style.AppThemeBlack);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
prefs.registerOnSharedPreferenceChangeListener(this);
|
|
|
|
|
|
|
|
|
|