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

Commit d854a84f authored by Aaron Liu's avatar Aaron Liu Committed by Automerger Merge Worker
Browse files

Merge changes Ic81ad683,I082c94f7,I43f93cbf,I0396ae62 into udc-dev am: db1dbe4d

parents 2802488b db1dbe4d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -277,6 +277,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
    @Override
    public void onResume(int reason) {
        mResumed = true;
        reset();
    }

    @Override
+6 −0
Original line number Diff line number Diff line
@@ -270,6 +270,12 @@ public class KeyguardPatternViewController
        }
    }

    @Override
    public void onResume(int reason) {
        super.onResume(reason);
        reset();
    }

    @Override
    public void onPause() {
        super.onPause();
+6 −1
Original line number Diff line number Diff line
@@ -54,19 +54,23 @@ public class KeyguardSecurityViewFlipperController
    private final Factory mKeyguardSecurityViewControllerFactory;
    private final FeatureFlags mFeatureFlags;

    private final ViewMediatorCallback mViewMediatorCallback;

    @Inject
    protected KeyguardSecurityViewFlipperController(KeyguardSecurityViewFlipper view,
            LayoutInflater layoutInflater,
            AsyncLayoutInflater asyncLayoutInflater,
            KeyguardInputViewController.Factory keyguardSecurityViewControllerFactory,
            EmergencyButtonController.Factory emergencyButtonControllerFactory,
            FeatureFlags featureFlags) {
            FeatureFlags featureFlags,
            ViewMediatorCallback viewMediatorCallback) {
        super(view);
        mKeyguardSecurityViewControllerFactory = keyguardSecurityViewControllerFactory;
        mLayoutInflater = layoutInflater;
        mEmergencyButtonControllerFactory = emergencyButtonControllerFactory;
        mAsyncLayoutInflater = asyncLayoutInflater;
        mFeatureFlags = featureFlags;
        mViewMediatorCallback = viewMediatorCallback;
    }

    @Override
@@ -152,6 +156,7 @@ public class KeyguardSecurityViewFlipperController
                                        keyguardSecurityCallback);
                        childController.init();
                        mChildren.add(childController);
                        mViewMediatorCallback.setNeedsInput(childController.needsInput());
                        if (onViewInflatedListener != null) {
                            onViewInflatedListener.onViewInflated();
                        }
+2 −2
Original line number Diff line number Diff line
@@ -225,12 +225,12 @@ object Flags {
    /** Whether to inflate the bouncer view on a background thread. */
    // TODO(b/272091103): Tracking Bug
    @JvmField
    val ASYNC_INFLATE_BOUNCER = unreleasedFlag(229, "async_inflate_bouncer", teamfood = false)
    val ASYNC_INFLATE_BOUNCER = unreleasedFlag(229, "async_inflate_bouncer", teamfood = true)

    /** Whether to inflate the bouncer view on a background thread. */
    // TODO(b/273341787): Tracking Bug
    @JvmField
    val PREVENT_BYPASS_KEYGUARD = unreleasedFlag(230, "prevent_bypass_keyguard")
    val PREVENT_BYPASS_KEYGUARD = unreleasedFlag(230, "prevent_bypass_keyguard", teamfood = true)

    /** Whether to use a new data source for intents to run on keyguard dismissal. */
    @JvmField
+11 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.keyguard;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -151,10 +152,19 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase {
                false);
    }


    @Test
    public void testReset() {
        mKeyguardAbsKeyInputViewController.reset();
        verify(mKeyguardMessageAreaController).setMessage("", false);
        verify(mAbsKeyInputView).resetPasswordText(false, false);
        verify(mLockPatternUtils).getLockoutAttemptDeadline(anyInt());
    }

    @Test
    public void onResume_Reset() {
        mKeyguardAbsKeyInputViewController.onResume(KeyguardSecurityView.VIEW_REVEALED);
        verify(mKeyguardMessageAreaController).setMessage("", false);
        verify(mAbsKeyInputView).resetPasswordText(false, false);
        verify(mLockPatternUtils).getLockoutAttemptDeadline(anyInt());
    }
}
Loading