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

Commit c874531e authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Set a minimum height for invocation lights

The height of the invocation lights view was set to the corner
radius, so phones with square corners (and therefore corner radius
zero) had zero-height views (making the motion indication invisible).

This change sets the minimum possible height to the height of the
lights themselves (the stroke width).

Fix: 138667570
Test: invoked assistant before and after change on walleye, change
causes assistant motion lights/indication to be visible

Change-Id: I54e765601688abb8d5c736a9b68556a876912639
parent 366a6e99
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -100,7 +100,9 @@ public class InvocationLightsView extends View

        int cornerRadiusBottom = DisplayUtils.getCornerRadiusBottom(context);
        int cornerRadiusTop = DisplayUtils.getCornerRadiusTop(context);
        mViewHeight = Math.max(cornerRadiusBottom, cornerRadiusTop);
        // ensure that height is non-zero even for square corners
        mViewHeight = Math.max(Math.max(cornerRadiusBottom, cornerRadiusTop),
            DisplayUtils.convertDpToPx(LIGHT_HEIGHT_DP, context));

        final int dualToneDarkTheme = Utils.getThemeAttr(mContext, R.attr.darkIconTheme);
        final int dualToneLightTheme = Utils.getThemeAttr(mContext, R.attr.lightIconTheme);