summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorGravatar Charles Lombardo2023-03-11 00:38:39 -0500
committerGravatar bunnei2023-06-03 00:05:41 -0700
commit8a4eb062e8d319625889cb29ffa5104c8e8386fe (patch)
treec7de3fb6bc0ab28901565852dee2aef90f52aaf2 /src/android
parentandroid: Convert StartupHandler to Kotlin (diff)
downloadyuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.gz
yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.tar.xz
yuzu-8a4eb062e8d319625889cb29ffa5104c8e8386fe.zip
android: Remove ThemeUtil
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ThemeUtil.java34
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 @@
1package org.yuzu.yuzu_emu.utils;
2
3import android.content.SharedPreferences;
4import android.os.Build;
5import android.preference.PreferenceManager;
6
7import androidx.appcompat.app.AppCompatDelegate;
8
9import org.yuzu.yuzu_emu.YuzuApplication;
10import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile;
11
12public class ThemeUtil {
13 private static SharedPreferences mPreferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.getAppContext());
14
15 private static void applyTheme(int designValue) {
16 switch (designValue) {
17 case 0:
18 AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
19 break;
20 case 1:
21 AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
22 break;
23 case 2:
24 AppCompatDelegate.setDefaultNightMode(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ?
25 AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM :
26 AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);
27 break;
28 }
29 }
30
31 public static void applyTheme() {
32 applyTheme(mPreferences.getInt(SettingsFile.KEY_DESIGN, 0));
33 }
34}