remove dead code in ThemesUtils

This commit is contained in:
aliveoutside
2022-09-10 17:47:41 +03:00
parent 0ed16b0836
commit 2520b709bd
@@ -3,7 +3,6 @@ package ru.vtosters.lite.utils;
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
import static ru.vtosters.lite.hooks.VKUIHook.isLoaded;
import static ru.vtosters.lite.ui.wallpapers.WallpapersHooks.getWallpaper;
import static ru.vtosters.lite.utils.AndroidUtils.edit;
import static ru.vtosters.lite.utils.AndroidUtils.getCenterScreenCoords;
import static ru.vtosters.lite.utils.AndroidUtils.getIdentifier;
import static ru.vtosters.lite.utils.AndroidUtils.getPrefsValue;
@@ -12,14 +11,12 @@ import static ru.vtosters.lite.utils.Preferences.color_grishka;
import static ru.vtosters.lite.utils.Preferences.dockbar_accent;
import static ru.vtosters.lite.utils.Preferences.milkshake;
import static ru.vtosters.lite.utils.Preferences.navbar;
import static ru.vtosters.lite.utils.Preferences.systemtheme;
import static ru.vtosters.lite.utils.Preferences.vkme;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -384,34 +381,6 @@ public class ThemesUtils {
);
}
public static void systemThemeChanger(Activity activity) { // ded
boolean isDarkTheme = isDarkTheme();
if (!isDarkTheme) {
applyTheme(getDarkTheme());
} else {
applyTheme(getLightTheme());
}
if (!systemtheme()) {
edit().putBoolean("isdark", isDarkTheme).commit();
return;
}
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_UNDEFINED:
case Configuration.UI_MODE_NIGHT_NO:
edit().putBoolean("isdark", false).commit();
setTheme(getLightTheme(), activity);
break;
case Configuration.UI_MODE_NIGHT_YES:
edit().putBoolean("isdark", true).commit();
setTheme(getDarkTheme(), activity);
break;
}
}
private void getCurrentThemeID(VKTheme paramVKTheme) {
Preference.b("vk_theme_helper", "current_theme", paramVKTheme.getId());
}