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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user