Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2a7a40c authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix issue where SmartSpace color could be wrong in AOD

Test: visual
Fixes: 71599239
Change-Id: I5f4b8af78ae2034f4f8ebfbc42ffea5694c6a425
parent 03863ba5
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe

        mClickActions.clear();
        final int subItemsCount = subItems.size();
        final int blendedColor = getTextColor();

        for (int i = 0; i < subItemsCount; i++) {
            SliceItem item = subItems.get(i);
@@ -159,7 +160,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
            KeyguardSliceButton button = mRow.findViewWithTag(itemTag);
            if (button == null) {
                button = new KeyguardSliceButton(mContext);
                button.setTextColor(mTextColor);
                button.setTextColor(blendedColor);
                button.setTag(itemTag);
            } else {
                mRow.removeView(button);
@@ -258,7 +259,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
    }

    private void updateTextColors() {
        final int blendedColor = ColorUtils.blendARGB(mTextColor, Color.WHITE, mDarkAmount);
        final int blendedColor = getTextColor();
        mTitle.setTextColor(blendedColor);
        int childCount = mRow.getChildCount();
        for (int i = 0; i < childCount; i++) {
@@ -322,6 +323,10 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
        }
    }

    public int getTextColor() {
        return ColorUtils.blendARGB(mTextColor, Color.WHITE, mDarkAmount);
    }

    /**
     * Representation of an item that appears under the clock on main keyguard message.
     * Shows optional separator.