From 6037800f125504e0e98eccd275d6b817227d37f3 Mon Sep 17 00:00:00 2001 From: Jamie Garside Date: Fri, 13 Aug 2021 13:58:34 +0100 Subject: [PATCH] Ensure that the keyguard container is always below message area. In the current layout, the keyguard container is simply added to the top-level NotificationShadeWindowView (descendant of FrameLayout) as a sibling of the message area, so there's no way to align anything underneath the message area (i.e. the "wrong PIN" bit). This is needed for future devices, as new UX specs have the PIN entry field (the four dots) immediately under the message area, rather than directly above the bouncer. Instead, this CL changes the keyguard inflation to inflate into a FrameLayout directly underneath the message area. LinearLayout weights are used to ensure it consumes all the remaining space. An alternative would be, of course, to move the message area into the keyguard views instead. This doesn't work, as the keyguard views are lazily inflated (even keyguard_bouncer.xml), and the message area is injected into some classes (via keyguard/dagger/KeyguardBouncerModule), and thus needs to be available before it has been added to the layout. It's probably fixable, but I really don't fancy rewriting half of the Dagger injection right now. Bug: 195012201 Test: Manually tested Change-Id: I5d909d8548c3ae31ade92935b143a6cdcab46700 --- .../res-keyguard/layout/keyguard_pin_view.xml | 6 +++--- .../res/layout/super_notification_shade.xml | 13 +++++++++---- .../android/systemui/statusbar/phone/StatusBar.java | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml index 7c54b90f1915e..a946318cb3136 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml @@ -20,8 +20,8 @@ + androidprv:layout_constraintVertical_bias="0.0"> - @@ -97,7 +98,11 @@ android:singleLine="true" android:ellipsize="marquee" android:focusable="true" /> - + +