From 6dbb2242b6cfce1fb7af8f06c80f47a06bdc5b8b Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 1 Aug 2023 13:22:41 +0200 Subject: [PATCH] Debug: folder favorite color --- .../email/FragmentDialogSelectFolder.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogSelectFolder.java b/app/src/main/java/eu/faircode/email/FragmentDialogSelectFolder.java index 35aeef2970..f5cf89b7e0 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogSelectFolder.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogSelectFolder.java @@ -409,16 +409,17 @@ public class FragmentDialogSelectFolder extends FragmentDialogBase { else { if (data.favorites != null && data.favorites.size() > 0) { Integer textColor = null; - try { - TypedValue tv = new TypedValue(); - Resources.Theme theme = context.getTheme(); - theme.resolveAttribute(android.R.attr.textAppearanceButton, tv, true); - int[] attr = new int[]{android.R.attr.textColor}; - TypedArray ta = theme.obtainStyledAttributes(tv.resourceId, attr); - textColor = ta.getColor(0, Color.BLACK); - } catch (Throwable ex) { - Log.e(ex); - } + if (BuildConfig.DEBUG) + try { + TypedValue tv = new TypedValue(); + Resources.Theme theme = context.getTheme(); + theme.resolveAttribute(android.R.attr.textAppearanceButton, tv, true); + int[] attr = new int[]{android.R.attr.textColor}; + TypedArray ta = theme.obtainStyledAttributes(tv.resourceId, attr); + textColor = ta.getColor(0, Color.BLACK); + } catch (Throwable ex) { + Log.e(ex); + } Button[] btn = new Button[]{btnFavorite1, btnFavorite2, btnFavorite3}; for (int i = 0; i < btn.length; i++)