From 28217d1c010a6f195d5900e6e81150630bcf1933 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Wed, 3 Feb 2021 09:51:04 -0500 Subject: [PATCH] Keyguard SIM PIN: Fix height Some views within the KeyguardSecurityViewFlipper limit their height, while others do not. When a view is marked as GONE, as when the ViewFlipper changes the focused child, disregard those views from the custom max height measurement as not to interfere with normal measurement. Fixes: 178412096 Test: use password or pattern bouncer, go back to aod/ls, reinsert locked SIM Change-Id: I06047bcd8fb7c11eb0bac272f28147e08b18988d --- .../src/com/android/keyguard/KeyguardSecurityViewFlipper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java index 7773fe9fab755..75ef4b32dfdaa 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java @@ -128,6 +128,8 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper { final int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); + if (child.getVisibility() != View.VISIBLE) continue; + final LayoutParams lp = (LayoutParams) child.getLayoutParams(); if (lp.maxWidth > 0 && lp.maxWidth < maxWidth) {