From 54ec6d715005a507a047e73ddaae35d7e307b8f2 Mon Sep 17 00:00:00 2001 From: lbill Date: Tue, 16 May 2023 17:33:21 +0000 Subject: [PATCH] Only offset header icon when description is possible to overlap keyboard Bug: 281485803 Test: Manual Test: ScreenshotTest Change-Id: I75ee8858dbfe7ef5f59312d3f04e092ab7bb3a6c --- .../systemui/biometrics/ui/CredentialPasswordView.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/CredentialPasswordView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/CredentialPasswordView.kt index ede62acb3255a..a3f34ce7471de 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/CredentialPasswordView.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/CredentialPasswordView.kt @@ -68,15 +68,15 @@ class CredentialPasswordView(context: Context, attrs: AttributeSet?) : var inputTopBound: Int var headerRightBound = right var headerTopBounds = top + var headerBottomBounds = bottom val subTitleBottom: Int = if (subtitleView.isGone) titleView.bottom else subtitleView.bottom val descBottom = if (descriptionView.isGone) subTitleBottom else descriptionView.bottom if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) { inputTopBound = (bottom - credentialInput.height) / 2 inputLeftBound = (right - left) / 2 headerRightBound = inputLeftBound - headerTopBounds -= iconView.bottom.coerceAtMost(bottomInset) - - if (descriptionView.bottom > bottomInset) { + if (descriptionView.bottom > headerBottomBounds) { + headerTopBounds -= iconView.bottom.coerceAtMost(bottomInset) credentialHeader.layout(left, headerTopBounds, headerRightBound, bottom) } } else {