diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java index 03d9eb3455fdb..59ee0d817ef3d 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java @@ -32,6 +32,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.content.Context; +import android.content.res.ColorStateList; import android.graphics.Insets; import android.graphics.Rect; import android.os.Trace; @@ -71,6 +72,8 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView { private Interpolator mLinearOutSlowInInterpolator; private Interpolator mFastOutLinearInInterpolator; private DisappearAnimationListener mDisappearAnimationListener; + private static final int[] DISABLE_STATE_SET = {-android.R.attr.state_enabled}; + private static final int[] ENABLE_STATE_SET = {android.R.attr.state_enabled}; public KeyguardPasswordView(Context context) { this(context, null); @@ -148,7 +151,10 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView { @Override protected void setPasswordEntryEnabled(boolean enabled) { - mPasswordEntry.setEnabled(enabled); + int color = mPasswordEntry.getTextColors().getColorForState( + enabled ? ENABLE_STATE_SET : DISABLE_STATE_SET, 0); + mPasswordEntry.setBackgroundTintList(ColorStateList.valueOf(color)); + mPasswordEntry.setCursorVisible(enabled); } @Override @@ -189,17 +195,18 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView { if (controller.isCancelled()) { return; } + float value = (float) animation.getAnimatedValue(); + float fraction = anim.getAnimatedFraction(); Insets shownInsets = controller.getShownStateInsets(); int dist = (int) (-shownInsets.bottom / 4 - * anim.getAnimatedFraction()); + * fraction); Insets insets = Insets.add(shownInsets, Insets.of(0, 0, 0, dist)); if (mDisappearAnimationListener != null) { mDisappearAnimationListener.setTranslationY(-dist); } - controller.setInsetsAndAlpha(insets, - (float) animation.getAnimatedValue(), - anim.getAnimatedFraction()); + controller.setInsetsAndAlpha(insets, value, fraction); + setAlpha(value); }); anim.addListener(new AnimatorListenerAdapter() { @Override diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index 57a859126db26..e379bd93c68f9 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -825,7 +825,8 @@ public class KeyguardSecurityContainerController extends ViewController