Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +51 −40 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.hardware.biometrics.BiometricSourceType; import android.os.Handler; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.util.Log; Loading Loading @@ -164,6 +165,10 @@ public class KeyguardBouncer { // In split system user mode, we never unlock system user. return; } try { Trace.beginSection("KeyguardBouncer#show"); ensureView(); mIsScrimmed = isScrimmed; Loading @@ -177,8 +182,8 @@ public class KeyguardBouncer { } if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. // showPrimarySecurityScreen() updates the current security method. This is needed // in case we are already showing and the current security method changed. showPrimarySecurityScreen(); } Loading @@ -191,15 +196,16 @@ public class KeyguardBouncer { UserManager.isSplitSystemUser() && activeUserId == UserHandle.USER_SYSTEM; final boolean allowDismissKeyguard = !isSystemUser && activeUserId == keyguardUserId; // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) is // set, this will dismiss the whole Keyguard. Otherwise, show the bouncer. // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) // is set, this will dismiss the whole Keyguard. Otherwise, show the bouncer. if (allowDismissKeyguard && mKeyguardViewController.dismiss(activeUserId)) { return; } // This condition may indicate an error on Android, so log it. if (!allowDismissKeyguard) { Log.w(TAG, "User can't dismiss keyguard: " + activeUserId + " != " + keyguardUserId); Log.w(TAG, "User can't dismiss keyguard: " + activeUserId + " != " + keyguardUserId); } mShowingSoon = true; Loading @@ -216,6 +222,9 @@ public class KeyguardBouncer { mCallback.onBouncerVisiblityChanged(true /* shown */); dispatchStartingToShow(); } finally { Trace.endSection(); } } public boolean isScrimmed() { Loading Loading @@ -317,6 +326,7 @@ public class KeyguardBouncer { } public void hide(boolean destroyView) { Trace.beginSection("KeyguardBouncer#hide"); if (isShowing()) { SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_BOUNCER_STATE_CHANGED, SysUiStatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN); Loading @@ -338,6 +348,7 @@ public class KeyguardBouncer { // be slow because of AM lock contention during unlocking. We can delay it a bit. mHandler.postDelayed(mRemoveViewRunnable, 50); } Trace.endSection(); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +41 −32 Original line number Diff line number Diff line Loading @@ -164,7 +164,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb @Override public void onVisibilityChanged(boolean isVisible) { if (!isVisible) { cancelPostAuthActions(); mCentralSurfaces.setBouncerHiddenFraction(KeyguardBouncer.EXPANSION_HIDDEN); } if (mAlternateAuthInterceptor != null) { Loading Loading @@ -502,9 +501,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void dismissWithAction(OnDismissAction r, Runnable cancelAction, boolean afterKeyguardGone, String message) { if (mShowing) { try { Trace.beginSection("StatusBarKeyguardViewManager#dismissWithAction"); cancelPendingWakeupAction(); // If we're dozing, this needs to be delayed until after we wake up - unless we're // wake-and-unlocking, because there dozing will last until the end of the transition. // wake-and-unlocking, because there dozing will last until the end of the // transition. if (mDozing && !isWakeAndUnlocking()) { mPendingWakeupAction = new DismissWithActionRequest( r, cancelAction, afterKeyguardGone, message); Loading @@ -515,30 +517,37 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mKeyguardGoneCancelAction = cancelAction; mDismissActionWillAnimateOnKeyguard = r != null && r.willRunAnimationOnKeyguard(); // If there is an an alternate auth interceptor (like the UDFPS), show that one instead // of the bouncer. // If there is an an alternate auth interceptor (like the UDFPS), show that one // instead of the bouncer. if (shouldShowAltAuth()) { if (!afterKeyguardGone) { mBouncer.setDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mBouncer.setDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mAfterKeyguardGoneAction = null; mKeyguardGoneCancelAction = null; } updateAlternateAuthShowing(mAlternateAuthInterceptor.showAlternateAuthBouncer()); updateAlternateAuthShowing( mAlternateAuthInterceptor.showAlternateAuthBouncer()); return; } if (afterKeyguardGone) { // we'll handle the dismiss action after keyguard is gone, so just show the bouncer // we'll handle the dismiss action after keyguard is gone, so just show the // bouncer mBouncer.show(false /* resetSecuritySelection */); } else { // after authentication success, run dismiss action with the option to defer // hiding the keyguard based on the return value of the OnDismissAction mBouncer.showWithDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mBouncer.showWithDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); // bouncer will handle the dismiss action, so we no longer need to track it here mAfterKeyguardGoneAction = null; mKeyguardGoneCancelAction = null; } } finally { Trace.endSection(); } } updateStates(); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +51 −40 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.hardware.biometrics.BiometricSourceType; import android.os.Handler; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.util.Log; Loading Loading @@ -164,6 +165,10 @@ public class KeyguardBouncer { // In split system user mode, we never unlock system user. return; } try { Trace.beginSection("KeyguardBouncer#show"); ensureView(); mIsScrimmed = isScrimmed; Loading @@ -177,8 +182,8 @@ public class KeyguardBouncer { } if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. // showPrimarySecurityScreen() updates the current security method. This is needed // in case we are already showing and the current security method changed. showPrimarySecurityScreen(); } Loading @@ -191,15 +196,16 @@ public class KeyguardBouncer { UserManager.isSplitSystemUser() && activeUserId == UserHandle.USER_SYSTEM; final boolean allowDismissKeyguard = !isSystemUser && activeUserId == keyguardUserId; // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) is // set, this will dismiss the whole Keyguard. Otherwise, show the bouncer. // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) // is set, this will dismiss the whole Keyguard. Otherwise, show the bouncer. if (allowDismissKeyguard && mKeyguardViewController.dismiss(activeUserId)) { return; } // This condition may indicate an error on Android, so log it. if (!allowDismissKeyguard) { Log.w(TAG, "User can't dismiss keyguard: " + activeUserId + " != " + keyguardUserId); Log.w(TAG, "User can't dismiss keyguard: " + activeUserId + " != " + keyguardUserId); } mShowingSoon = true; Loading @@ -216,6 +222,9 @@ public class KeyguardBouncer { mCallback.onBouncerVisiblityChanged(true /* shown */); dispatchStartingToShow(); } finally { Trace.endSection(); } } public boolean isScrimmed() { Loading Loading @@ -317,6 +326,7 @@ public class KeyguardBouncer { } public void hide(boolean destroyView) { Trace.beginSection("KeyguardBouncer#hide"); if (isShowing()) { SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_BOUNCER_STATE_CHANGED, SysUiStatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN); Loading @@ -338,6 +348,7 @@ public class KeyguardBouncer { // be slow because of AM lock contention during unlocking. We can delay it a bit. mHandler.postDelayed(mRemoveViewRunnable, 50); } Trace.endSection(); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +41 −32 Original line number Diff line number Diff line Loading @@ -164,7 +164,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb @Override public void onVisibilityChanged(boolean isVisible) { if (!isVisible) { cancelPostAuthActions(); mCentralSurfaces.setBouncerHiddenFraction(KeyguardBouncer.EXPANSION_HIDDEN); } if (mAlternateAuthInterceptor != null) { Loading Loading @@ -502,9 +501,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void dismissWithAction(OnDismissAction r, Runnable cancelAction, boolean afterKeyguardGone, String message) { if (mShowing) { try { Trace.beginSection("StatusBarKeyguardViewManager#dismissWithAction"); cancelPendingWakeupAction(); // If we're dozing, this needs to be delayed until after we wake up - unless we're // wake-and-unlocking, because there dozing will last until the end of the transition. // wake-and-unlocking, because there dozing will last until the end of the // transition. if (mDozing && !isWakeAndUnlocking()) { mPendingWakeupAction = new DismissWithActionRequest( r, cancelAction, afterKeyguardGone, message); Loading @@ -515,30 +517,37 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mKeyguardGoneCancelAction = cancelAction; mDismissActionWillAnimateOnKeyguard = r != null && r.willRunAnimationOnKeyguard(); // If there is an an alternate auth interceptor (like the UDFPS), show that one instead // of the bouncer. // If there is an an alternate auth interceptor (like the UDFPS), show that one // instead of the bouncer. if (shouldShowAltAuth()) { if (!afterKeyguardGone) { mBouncer.setDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mBouncer.setDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mAfterKeyguardGoneAction = null; mKeyguardGoneCancelAction = null; } updateAlternateAuthShowing(mAlternateAuthInterceptor.showAlternateAuthBouncer()); updateAlternateAuthShowing( mAlternateAuthInterceptor.showAlternateAuthBouncer()); return; } if (afterKeyguardGone) { // we'll handle the dismiss action after keyguard is gone, so just show the bouncer // we'll handle the dismiss action after keyguard is gone, so just show the // bouncer mBouncer.show(false /* resetSecuritySelection */); } else { // after authentication success, run dismiss action with the option to defer // hiding the keyguard based on the return value of the OnDismissAction mBouncer.showWithDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); mBouncer.showWithDismissAction(mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); // bouncer will handle the dismiss action, so we no longer need to track it here mAfterKeyguardGoneAction = null; mKeyguardGoneCancelAction = null; } } finally { Trace.endSection(); } } updateStates(); } Loading