Loading packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java +1 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey if (reason != PROMPT_REASON_NONE) { int promtReasonStringRes = mView.getPromptReasonStringRes(reason); if (promtReasonStringRes != 0) { mMessageAreaController.setMessage( mView.getResources().getString(promtReasonStringRes), false); mMessageAreaController.setMessage(promtReasonStringRes); } } } Loading packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +1 −3 Original line number Diff line number Diff line Loading @@ -143,9 +143,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> public void startAppearAnimation() { if (TextUtils.isEmpty(mMessageAreaController.getMessage())) { mMessageAreaController.setMessage( mView.getResources().getString(getInitialMessageResId()), /* animate= */ false); mMessageAreaController.setMessage(getInitialMessageResId()); } mView.startAppearAnimation(); } Loading packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java +1 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ 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); Loading Loading @@ -182,7 +181,7 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { if (mAppearAnimator.isRunning()) { mAppearAnimator.cancel(); } mAppearAnimator.setDuration(ANIMATION_DURATION); mAppearAnimator.setDuration(650); mAppearAnimator.addUpdateListener(animation -> animate(animation.getAnimatedFraction())); mAppearAnimator.start(); } Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +5 −20 Original line number Diff line number Diff line Loading @@ -36,11 +36,8 @@ import static com.android.systemui.plugins.FalsingManager.LOW_PENALTY; import static java.lang.Integer.max; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.app.Activity; import android.app.AlertDialog; import android.app.admin.DevicePolicyManager; Loading Loading @@ -970,23 +967,11 @@ public class KeyguardSecurityContainer extends ConstraintLayout { } mUserSwitcherViewGroup.setAlpha(0f); ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f); int yTrans = mView.getResources().getDimensionPixelSize(R.dimen.pin_view_trans_y_entry); animator.setInterpolator(Interpolators.STANDARD_DECELERATE); animator.setDuration(650); animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mUserSwitcherViewGroup.setAlpha(1f); mUserSwitcherViewGroup.setTranslationY(0f); } }); animator.addUpdateListener(animation -> { float value = (float) animation.getAnimatedValue(); mUserSwitcherViewGroup.setAlpha(value); mUserSwitcherViewGroup.setTranslationY(yTrans - yTrans * value); }); animator.start(); ObjectAnimator alphaAnim = ObjectAnimator.ofFloat(mUserSwitcherViewGroup, View.ALPHA, 1f); alphaAnim.setInterpolator(Interpolators.ALPHA_IN); alphaAnim.setDuration(500); alphaAnim.start(); } @Override Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardAbsKeyInputViewControllerTest.java +0 −20 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.keyguard; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; Loading Loading @@ -88,7 +87,6 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase { when(mAbsKeyInputView.isAttachedToWindow()).thenReturn(true); when(mAbsKeyInputView.requireViewById(R.id.bouncer_message_area)) .thenReturn(mKeyguardMessageArea); when(mAbsKeyInputView.getResources()).thenReturn(getContext().getResources()); mKeyguardAbsKeyInputViewController = new KeyguardAbsKeyInputViewController(mAbsKeyInputView, mKeyguardUpdateMonitor, mSecurityMode, mLockPatternUtils, mKeyguardSecurityCallback, mKeyguardMessageAreaControllerFactory, mLatencyTracker, mFalsingCollector, Loading Loading @@ -127,22 +125,4 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase { verifyZeroInteractions(mKeyguardSecurityCallback); verifyZeroInteractions(mKeyguardMessageAreaController); } @Test public void onPromptReasonNone_doesNotSetMessage() { mKeyguardAbsKeyInputViewController.showPromptReason(0); verify(mKeyguardMessageAreaController, never()).setMessage( getContext().getResources().getString(R.string.kg_prompt_reason_restart_password), false); } @Test public void onPromptReason_setsMessage() { when(mAbsKeyInputView.getPromptReasonStringRes(1)).thenReturn( R.string.kg_prompt_reason_restart_password); mKeyguardAbsKeyInputViewController.showPromptReason(1); verify(mKeyguardMessageAreaController).setMessage( getContext().getResources().getString(R.string.kg_prompt_reason_restart_password), false); } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java +1 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey if (reason != PROMPT_REASON_NONE) { int promtReasonStringRes = mView.getPromptReasonStringRes(reason); if (promtReasonStringRes != 0) { mMessageAreaController.setMessage( mView.getResources().getString(promtReasonStringRes), false); mMessageAreaController.setMessage(promtReasonStringRes); } } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +1 −3 Original line number Diff line number Diff line Loading @@ -143,9 +143,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> public void startAppearAnimation() { if (TextUtils.isEmpty(mMessageAreaController.getMessage())) { mMessageAreaController.setMessage( mView.getResources().getString(getInitialMessageResId()), /* animate= */ false); mMessageAreaController.setMessage(getInitialMessageResId()); } mView.startAppearAnimation(); } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java +1 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ 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); Loading Loading @@ -182,7 +181,7 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { if (mAppearAnimator.isRunning()) { mAppearAnimator.cancel(); } mAppearAnimator.setDuration(ANIMATION_DURATION); mAppearAnimator.setDuration(650); mAppearAnimator.addUpdateListener(animation -> animate(animation.getAnimatedFraction())); mAppearAnimator.start(); } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +5 −20 Original line number Diff line number Diff line Loading @@ -36,11 +36,8 @@ import static com.android.systemui.plugins.FalsingManager.LOW_PENALTY; import static java.lang.Integer.max; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.app.Activity; import android.app.AlertDialog; import android.app.admin.DevicePolicyManager; Loading Loading @@ -970,23 +967,11 @@ public class KeyguardSecurityContainer extends ConstraintLayout { } mUserSwitcherViewGroup.setAlpha(0f); ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f); int yTrans = mView.getResources().getDimensionPixelSize(R.dimen.pin_view_trans_y_entry); animator.setInterpolator(Interpolators.STANDARD_DECELERATE); animator.setDuration(650); animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mUserSwitcherViewGroup.setAlpha(1f); mUserSwitcherViewGroup.setTranslationY(0f); } }); animator.addUpdateListener(animation -> { float value = (float) animation.getAnimatedValue(); mUserSwitcherViewGroup.setAlpha(value); mUserSwitcherViewGroup.setTranslationY(yTrans - yTrans * value); }); animator.start(); ObjectAnimator alphaAnim = ObjectAnimator.ofFloat(mUserSwitcherViewGroup, View.ALPHA, 1f); alphaAnim.setInterpolator(Interpolators.ALPHA_IN); alphaAnim.setDuration(500); alphaAnim.start(); } @Override Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardAbsKeyInputViewControllerTest.java +0 −20 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.keyguard; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; Loading Loading @@ -88,7 +87,6 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase { when(mAbsKeyInputView.isAttachedToWindow()).thenReturn(true); when(mAbsKeyInputView.requireViewById(R.id.bouncer_message_area)) .thenReturn(mKeyguardMessageArea); when(mAbsKeyInputView.getResources()).thenReturn(getContext().getResources()); mKeyguardAbsKeyInputViewController = new KeyguardAbsKeyInputViewController(mAbsKeyInputView, mKeyguardUpdateMonitor, mSecurityMode, mLockPatternUtils, mKeyguardSecurityCallback, mKeyguardMessageAreaControllerFactory, mLatencyTracker, mFalsingCollector, Loading Loading @@ -127,22 +125,4 @@ public class KeyguardAbsKeyInputViewControllerTest extends SysuiTestCase { verifyZeroInteractions(mKeyguardSecurityCallback); verifyZeroInteractions(mKeyguardMessageAreaController); } @Test public void onPromptReasonNone_doesNotSetMessage() { mKeyguardAbsKeyInputViewController.showPromptReason(0); verify(mKeyguardMessageAreaController, never()).setMessage( getContext().getResources().getString(R.string.kg_prompt_reason_restart_password), false); } @Test public void onPromptReason_setsMessage() { when(mAbsKeyInputView.getPromptReasonStringRes(1)).thenReturn( R.string.kg_prompt_reason_restart_password); mKeyguardAbsKeyInputViewController.showPromptReason(1); verify(mKeyguardMessageAreaController).setMessage( getContext().getResources().getString(R.string.kg_prompt_reason_restart_password), false); } }