added try-catch block for ignoring unknown resource ids

This commit is contained in:
Vologhat
2022-11-22 11:43:37 +03:00
parent b35d5c428f
commit e3b33a88c7
@@ -79,7 +79,10 @@ public class VTLColors {
}
public static int getColor(Context context, int colorId) {
Log.d("VTLColors", String.format("getColor(Landroid/content/Context;I): %s", AndroidUtils.getResources().getResourceEntryName(colorId)));
try {
Log.d("VTLColors", "getColor(Landroid/content/Context;I): " + AndroidUtils.getResources().getResourceEntryName(colorId));
} catch (Throwable ignored) {
}
if (ThemesUtils.isCustomThemeApplied()) {
int color = currentTheme.getColor(colorId);
if (color != -1)