From 565e760b200c735d1214d125b8deda37069ff76f Mon Sep 17 00:00:00 2001 From: ArtDev <45949002+artdeell@users.noreply.github.com> Date: Mon, 4 Sep 2023 09:40:15 +0300 Subject: [PATCH] Chore[profile]: remove old commented code --- .../profiles/ProfileIconCache.java | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/profiles/ProfileIconCache.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/profiles/ProfileIconCache.java index 9cf343e9d..0be873be8 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/profiles/ProfileIconCache.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/profiles/ProfileIconCache.java @@ -88,39 +88,4 @@ public class ProfileIconCache { if(!dataEncoding.equals("base64")) return null; return Base64.decode(inputString.substring(commaAfterSemicolon+1), 0); } - - - /*public static void initDefault(Context context) { - if(sDefaultIcon != null) return; - sDefaultIcon = ResourcesCompat.getDrawable(context.getResources(), R.mipmap.ic_launcher_foreground, null); - if(sDefaultIcon != null) sDefaultIcon.setBounds(0, 0, 10, 10); - } - - public static Drawable getCachedIcon(String key) { - return sIconCache.get(key); - } - - public static Drawable submitIcon(Resources resources, String key, String base64) { - byte[] pngBytes = Base64.decode(base64, Base64.DEFAULT); - Drawable drawable = new BitmapDrawable(resources, BitmapFactory.decodeByteArray(pngBytes, 0, pngBytes.length)); - sIconCache.put(key, drawable); - return drawable; - } - - public static Drawable tryResolveIcon(Resources resources, String profileName, String b64Icon) { - Drawable icon; - if (b64Icon != null && b64Icon.startsWith(BASE64_PNG_HEADER)) { - icon = ProfileIconCache.submitIcon(resources, profileName, b64Icon.substring(BASE64_PNG_HEADER.length())); - }else{ - Log.i("IconParser","Unsupported icon: "+b64Icon); - icon = ProfileIconCache.pushDefaultIcon(profileName); - } - return icon; - } - - public static Drawable pushDefaultIcon(String key) { - sIconCache.put(key, sDefaultIcon); - - return sDefaultIcon; - }*/ }