diff --git a/app/src/main/java/com/zzzmode/appopsx/ui/BaseActivity.java b/app/src/main/java/com/zzzmode/appopsx/ui/BaseActivity.java index 6169076..7381a18 100644 --- a/app/src/main/java/com/zzzmode/appopsx/ui/BaseActivity.java +++ b/app/src/main/java/com/zzzmode/appopsx/ui/BaseActivity.java @@ -17,10 +17,7 @@ public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - int themeMode = SpHelper.getThemeMode(this); - if(themeMode != AppCompatDelegate.MODE_NIGHT_AUTO) { - AppCompatDelegate.setDefaultNightMode(themeMode); - } + AppCompatDelegate.setDefaultNightMode(SpHelper.getThemeMode(this)); } @Override diff --git a/app/src/main/java/com/zzzmode/appopsx/ui/core/SpHelper.java b/app/src/main/java/com/zzzmode/appopsx/ui/core/SpHelper.java index b67aff5..3eed819 100644 --- a/app/src/main/java/com/zzzmode/appopsx/ui/core/SpHelper.java +++ b/app/src/main/java/com/zzzmode/appopsx/ui/core/SpHelper.java @@ -19,7 +19,7 @@ public static int getThemeMode(Context context){ if(getSharedPreferences(context).getBoolean("pref_app_daynight_mode", false)){ return AppCompatDelegate.MODE_NIGHT_YES; } - return AppCompatDelegate.MODE_NIGHT_AUTO; + return AppCompatDelegate.MODE_NIGHT_NO; } }