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

Commit 159d7482 authored by Aaron Liu's avatar Aaron Liu Committed by Android (Google) Code Review
Browse files

Merge changes Id3aaa354,Ia2782c7c into tm-qpr-dev

* changes:
  Revert "Revert "[Bouncer] refine entry for bouncer user switcher.""
  [Bouncer] Have initial message id for sim pin.
parents d411dd57 bc13410b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -260,7 +260,8 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
        if (reason != PROMPT_REASON_NONE) {
            int promtReasonStringRes = mView.getPromptReasonStringRes(reason);
            if (promtReasonStringRes != 0) {
                mMessageAreaController.setMessage(promtReasonStringRes);
                mMessageAreaController.setMessage(
                        mView.getResources().getString(promtReasonStringRes), false);
            }
        }
    }
+6 −5
Original line number Diff line number Diff line
@@ -142,8 +142,11 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
    }

    public void startAppearAnimation() {
        if (TextUtils.isEmpty(mMessageAreaController.getMessage())) {
            mMessageAreaController.setMessage(getInitialMessageResId());
        if (TextUtils.isEmpty(mMessageAreaController.getMessage())
                && getInitialMessageResId() != 0) {
            mMessageAreaController.setMessage(
                    mView.getResources().getString(getInitialMessageResId()),
                    /* animate= */ false);
        }
        mView.startAppearAnimation();
    }
@@ -163,9 +166,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
    }

    /** Determines the message to show in the bouncer when it first appears. */
    protected int getInitialMessageResId() {
        return 0;
    }
    protected abstract int getInitialMessageResId();

    /** Factory for a {@link KeyguardInputViewController}. */
    public static class Factory {
+2 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
    private int mYTransOffset;
    private View mBouncerMessageView;
    @DevicePostureInt private int mLastDevicePosture = DEVICE_POSTURE_UNKNOWN;
    public static final long ANIMATION_DURATION = 650;

    public KeyguardPINView(Context context) {
        this(context, null);
@@ -181,7 +182,7 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
        if (mAppearAnimator.isRunning()) {
            mAppearAnimator.cancel();
        }
        mAppearAnimator.setDuration(650);
        mAppearAnimator.setDuration(ANIMATION_DURATION);
        mAppearAnimator.addUpdateListener(animation -> animate(animation.getAnimatedFraction()));
        mAppearAnimator.start();
    }
+5 −0
Original line number Diff line number Diff line
@@ -139,4 +139,9 @@ public abstract class KeyguardPinBasedInputViewController<T extends KeyguardPinB
        super.startErrorAnimation();
        mView.startErrorAnimation();
    }

    @Override
    protected int getInitialMessageResId() {
        return R.string.keyguard_enter_your_pin;
    }
}
+0 −5
Original line number Diff line number Diff line
@@ -74,9 +74,4 @@ public class KeyguardPinViewController
        return mView.startDisappearAnimation(
                mKeyguardUpdateMonitor.needsSlowUnlockTransition(), finishRunnable);
    }

    @Override
    protected int getInitialMessageResId() {
        return R.string.keyguard_enter_your_pin;
    }
}
Loading