Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44d1af82 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Revert "[Bouncer] reset bouncer visibility with doze state."" into...

Merge "Revert "[Bouncer] reset bouncer visibility with doze state."" into tm-qpr-dev am: 1c9f7129 am: 39e076bb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20089450



Change-Id: I391161aeb6cb9cf83340128dd26bb5a41d8f6c88
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b85b63d7 39e076bb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -732,7 +732,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    private void setDozing(boolean dozing) {
        if (mDozing != dozing) {
            mDozing = dozing;
            reset(true /* hideBouncerWhenShowing */);
            if (dozing || mBouncer.needsFullscreenBouncer() || mOccluded) {
                reset(dozing /* hideBouncerWhenShowing */);
            }
            updateStates();

            if (!dozing) {
+0 −18
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

@@ -526,21 +525,4 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        mBouncerExpansionCallback.onVisibilityChanged(false);
        verify(mCentralSurfaces).setBouncerShowingOverDream(false);
    }

    @Test
    public void testSetDozing_Dozing() {
        clearInvocations(mBouncer);
        mStatusBarKeyguardViewManager.onDozingChanged(true);
        // Once when shown and once with dozing changed.
        verify(mBouncer, times(1)).hide(false);
    }

    @Test
    public void testSetDozing_notDozing() {
        mStatusBarKeyguardViewManager.onDozingChanged(true);
        clearInvocations(mBouncer);
        mStatusBarKeyguardViewManager.onDozingChanged(false);
        // Once when shown and twice with dozing changed.
        verify(mBouncer, times(1)).hide(false);
    }
}