From c874531e45fc20c2553499c5a59a86bf86b27bd0 Mon Sep 17 00:00:00 2001 From: Miranda Kephart Date: Tue, 13 Aug 2019 12:46:53 -0400 Subject: [PATCH] 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 --- .../com/android/systemui/assist/ui/InvocationLightsView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java b/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java index bc782a7d62eba..bb3bd781df66d 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java +++ b/packages/SystemUI/src/com/android/systemui/assist/ui/InvocationLightsView.java @@ -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);