From 2cf93436fbfe6acd3cad512c177b5885928ffc16 Mon Sep 17 00:00:00 2001 From: ShirosakiMio <852468399@qq.com> Date: Fri, 20 Dec 2024 09:28:19 +0800 Subject: [PATCH] Fix: Crash on start #747 #746 --- .../java/com/tungsten/fcllibrary/component/theme/Theme.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FCLLibrary/src/main/java/com/tungsten/fcllibrary/component/theme/Theme.java b/FCLLibrary/src/main/java/com/tungsten/fcllibrary/component/theme/Theme.java index f7160f0b6..6a68e555e 100644 --- a/FCLLibrary/src/main/java/com/tungsten/fcllibrary/component/theme/Theme.java +++ b/FCLLibrary/src/main/java/com/tungsten/fcllibrary/component/theme/Theme.java @@ -207,9 +207,9 @@ public static Theme getTheme(Context context) { boolean closeSkinModel = sharedPreferences.getBoolean("close_skin_model", false); boolean modified = sharedPreferences.getBoolean("modified", false); int animationSpeed = sharedPreferences.getInt("animation_speed", 8); - Bitmap lt = ImageUtil.load(FCLPath.LT_BACKGROUND_PATH).orElse(ConvertUtils.getBitmapFromRes(context, R.drawable.background_light)); + Bitmap lt = ImageUtil.load(context.getFilesDir().getAbsolutePath() + "/background/lt.png").orElse(ConvertUtils.getBitmapFromRes(context, R.drawable.background_light)); BitmapDrawable backgroundLt = new BitmapDrawable(context.getResources(), lt); - Bitmap dk = ImageUtil.load(FCLPath.DK_BACKGROUND_PATH).orElse(ConvertUtils.getBitmapFromRes(context, R.drawable.background_dark)); + Bitmap dk = ImageUtil.load(context.getFilesDir().getAbsolutePath() + "/background/dk.png").orElse(ConvertUtils.getBitmapFromRes(context, R.drawable.background_dark)); BitmapDrawable backgroundDk = new BitmapDrawable(context.getResources(), dk); return new Theme(color, color2, fullscreen, closeSkinModel, animationSpeed, backgroundLt, backgroundDk, modified); }