diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-03-11 06:38:39 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:41 +0200 |
commit | 8a4eb062e8d319625889cb29ffa5104c8e8386fe (patch) | |
tree | c7de3fb6bc0ab28901565852dee2aef90f52aaf2 | |
parent | android: Convert StartupHandler to Kotlin (diff) | |
download | yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.gz yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.bz2 yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.lz yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.xz yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.zst yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.zip |
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeUtil.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeUtil.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeUtil.java deleted file mode 100644 index 4e4d48039..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeUtil.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.yuzu.yuzu_emu.utils; - -import android.content.SharedPreferences; -import android.os.Build; -import android.preference.PreferenceManager; - -import androidx.appcompat.app.AppCompatDelegate; - -import org.yuzu.yuzu_emu.YuzuApplication; -import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile; - -public class ThemeUtil { - private static SharedPreferences mPreferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.getAppContext()); - - private static void applyTheme(int designValue) { - switch (designValue) { - case 0: - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - break; - case 1: - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - break; - case 2: - AppCompatDelegate.setDefaultNightMode(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ? - AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM : - AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY); - break; - } - } - - public static void applyTheme() { - applyTheme(mPreferences.getInt(SettingsFile.KEY_DESIGN, 0)); - } -} |