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

Commit d9c0692a authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: fix zen mode panel warning not showing



We need to request a relayout of the view so the panel has a chance to
pick up the new height and update to that size.

Ref: CYNGNOS-2063

Change-Id: I6fa95f7a5a72646e0a990b6ffbac51fffdcf5272
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
(cherry picked from commit 01a26858)
parent b00b4870
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -421,8 +421,13 @@ public class ZenModePanel extends LinearLayout {
            mZenIntroductionCustomize.setVisibility(zenImportant ? VISIBLE : GONE);
        }
        final String warning = computeAlarmWarningText(zenNone);
        mZenAlarmWarning.setVisibility(warning != null ? VISIBLE : GONE);
        final int oldVis = mZenAlarmWarning.getVisibility();
        final int newVis = warning != null ? VISIBLE : GONE;
        mZenAlarmWarning.setVisibility(newVis);
        mZenAlarmWarning.setText(warning);
        if (newVis != oldVis) {
            requestLayout();
        }
    }

    private String computeAlarmWarningText(boolean zenNone) {