summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2021-02-22 14:45:47 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-02-22 14:45:47 +0000
commitce4baef6ea2becc005c7387a4036ec57237038ec (patch)
tree7121cfdcafc3098b45c6d91d2172bacde0c019c0
parent6bb6992fe9e0914bfbfaed49db5c3e19c4c6c70c (diff)
parentdf949e401bc3a4a7bc4b9e1156a81c41816e1653 (diff)
Merge "Password bouncer - Fix IME with no view" into sc-dev
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
index 92b65b242b0e..533bec14f60a 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
@@ -136,14 +136,23 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView {
@Override
public void startAppearAnimation() {
- // Reset state, and let IME animation reveal the view as it slides in
+ // Reset state, and let IME animation reveal the view as it slides in, if one exists.
+ // It is possible for an IME to have no view, so provide a default animation since no
+ // calls to animateForIme would occur
setAlpha(0f);
+ animate()
+ .alpha(1f)
+ .setDuration(500)
+ .setStartDelay(300)
+ .start();
+
setTranslationY(0f);
}
@Override
public void animateForIme(float interpolatedFraction) {
- setAlpha(interpolatedFraction);
+ animate().cancel();
+ setAlpha(Math.max(interpolatedFraction, getAlpha()));
}
@Override