Skip to content

Commit 68c2489

Browse files
author
Jim Miller
committed
Disable security view transitions in keyguard
Now that we have a single stage unlock, there's no need for the transition. This was causing unnecessary flickering to happen in views where we add the security view just after inflation, which triggers the animation. Fixes bug 7343632 Change-Id: I5bb8e37df66e4d96f00719e318424d46bf0e2e5a
1 parent 3b9f9bc commit 68c2489

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected void onFinishInflate() {
162162
addDefaultWidgets();
163163
updateSecurityViews();
164164
setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
165-
165+
166166
if (KeyguardUpdateMonitor.getInstance(mContext).getIsFirstBoot()) {
167167
showPrimarySecurityScreen(false);
168168
}
@@ -425,7 +425,7 @@ void showPrimarySecurityScreen(boolean turningOff) {
425425
}
426426
showSecurityScreen(securityMode);
427427
}
428-
428+
429429
/**
430430
* Shows the backup security screen for the current security mode. This could be used for
431431
* password recovery screens but is currently only used for pattern unlock to show the
@@ -493,7 +493,7 @@ private void showNextSecurityScreenOrFinish(boolean authenticated) {
493493
// enabled because the user has left keyguard.
494494
KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(true);
495495
KeyguardUpdateMonitor.getInstance(mContext).setIsFirstBoot(false);
496-
496+
497497
// If there's a pending runnable because the user interacted with a widget
498498
// and we're leaving keyguard, then run it.
499499
if (mLaunchRunnable != null) {
@@ -597,7 +597,7 @@ private KeyguardSecurityView getSecurityView(SecurityMode securityMode) {
597597
View carrierText = selectorView.findViewById(R.id.keyguard_selector_fade_container);
598598
selectorView.setCarrierArea(carrierText);
599599
}
600-
600+
601601
return view;
602602
}
603603

@@ -608,8 +608,8 @@ private KeyguardSecurityView getSecurityView(SecurityMode securityMode) {
608608
* @param securityMode
609609
*/
610610
private void showSecurityScreen(SecurityMode securityMode) {
611-
if (DEBUG) Log.d(TAG, "showSecurityScreen");
612-
611+
if (DEBUG) Log.d(TAG, "showSecurityScreen(" + securityMode + ")");
612+
613613
if (securityMode == mCurrentSecuritySelection) return;
614614

615615
KeyguardSecurityView oldView = getSecurityView(mCurrentSecuritySelection);
@@ -628,10 +628,12 @@ private void showSecurityScreen(SecurityMode securityMode) {
628628
final int childCount = mSecurityViewContainer.getChildCount();
629629

630630
// Do flip animation to the next screen
631-
mSecurityViewContainer.setInAnimation(
632-
AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_in));
633-
mSecurityViewContainer.setOutAnimation(
634-
AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_out));
631+
if (false) {
632+
mSecurityViewContainer.setInAnimation(
633+
AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_in));
634+
mSecurityViewContainer.setOutAnimation(
635+
AnimationUtils.loadAnimation(mContext, R.anim.keyguard_security_animate_out));
636+
}
635637
final int securityViewIdForMode = getSecurityViewIdForMode(securityMode);
636638
for (int i = 0; i < childCount; i++) {
637639
if (mSecurityViewContainer.getChildAt(i).getId() == securityViewIdForMode) {
@@ -640,11 +642,10 @@ private void showSecurityScreen(SecurityMode securityMode) {
640642
}
641643
}
642644

643-
644645
if (securityMode == SecurityMode.None) {
645646
// Discard current runnable if we're switching back to the selector view
646647
setOnDismissRunnable(null);
647-
}
648+
}
648649
mCurrentSecuritySelection = securityMode;
649650
}
650651

@@ -809,7 +810,7 @@ public void onPlayStateChanged() {
809810
});
810811
}
811812

812-
mKeyguardStatusViewManager = ((KeyguardStatusView)
813+
mKeyguardStatusViewManager = ((KeyguardStatusView)
813814
findViewById(R.id.keyguard_status_view_face_palm)).getManager();
814815

815816
}

0 commit comments

Comments
 (0)