diff options
author | Aaron Liu <aaronjli@google.com> | 2023-05-12 13:55:16 -0700 |
---|---|---|
committer | Aaron Liu <aaronjli@google.com> | 2023-05-12 14:00:06 -0700 |
commit | 0e6ba4ffe790a1145fa230c4b795196efcbcff0a (patch) | |
tree | 56d3d3990fb3980957e93e8b7f661113c045e3bf /packages/SystemUI/tests | |
parent | ef9b2174dc833516ac4764e4d0e145fa1eeefda9 (diff) | |
download | base-0e6ba4ffe790a1145fa230c4b795196efcbcff0a.tar.gz |
Do not set alpha to 1f when bouncer shows
Alpha here was set to 1f everytime the bouncer shows to ensure that the
bouncer shows every time. This has caused issues with the introduction
of a material U background color for the bouncer. We had bugs where the bouncer alpha was 0, which is why alpha is set to 1f here.
Looking at it further, setExpansion is not called in the cases that
expansion is already 0f. This is because we were not setting the panel
expansion to HIDDEN (1f) anytime we hide the bouncer.
Fixes: 281024571
Test: Simpin/Simpuk
Test: password, pattern, pin scrimmed and track
Test: Testing auth and then power off and on and going back to scrimmed
bouncer and tracked bouncer.
Change-Id: I572280daef98da64045e12508a6efd60141a42b6
Diffstat (limited to 'packages/SystemUI/tests')
2 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java index 65ddb53f748b..29c38169cd3e 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java @@ -18,6 +18,7 @@ package com.android.keyguard; import static com.android.keyguard.KeyguardSecurityContainer.MODE_DEFAULT; import static com.android.keyguard.KeyguardSecurityContainer.MODE_ONE_HANDED; +import static com.android.systemui.keyguard.shared.constants.KeyguardBouncerConstants.EXPANSION_VISIBLE; import static com.google.common.truth.Truth.assertThat; @@ -685,6 +686,14 @@ public class KeyguardSecurityContainerControllerTest extends SysuiTestCase { verify(mSideFpsController).hide(SideFpsUiRequestSource.PRIMARY_BOUNCER); } + @Test + public void setExpansion_setsAlpha() { + mKeyguardSecurityContainerController.setExpansion(EXPANSION_VISIBLE); + + verify(mView).setAlpha(1f); + verify(mView).setTranslationY(0f); + } + private KeyguardSecurityContainer.SwipeListener getRegisteredSwipeListener() { mKeyguardSecurityContainerController.onViewAttached(); verify(mView).setSwipeListener(mSwipeListenerArgumentCaptor.capture()); diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt index eed1e739b909..9153d6ef138f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt @@ -154,6 +154,7 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() { verify(repository).setPrimaryShow(false) verify(mPrimaryBouncerCallbackInteractor).dispatchVisibilityChanged(View.INVISIBLE) verify(repository).setPrimaryStartDisappearAnimation(null) + verify(repository).setPanelExpansion(EXPANSION_HIDDEN) } @Test |