Loading packages/SystemUI/res-keyguard/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ <!-- The vertical margin between the date and the owner info. --> <!-- The translation for disappearing security views after having solved them. --> <dimen name="disappear_y_translation">-50dp</dimen> <dimen name="disappear_y_translation">-32dp</dimen> <!-- Dimens for animation for the Bouncer PIN view --> <dimen name="pin_view_trans_y_entry">120dp</dimen> Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +7 −3 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ 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; Loading Loading @@ -1067,10 +1068,13 @@ public class KeyguardSecurityContainer extends ConstraintLayout { int yTranslation = mResources.getDimensionPixelSize(R.dimen.disappear_y_translation); AnimatorSet anims = new AnimatorSet(); ObjectAnimator yAnim = ObjectAnimator.ofFloat(mView, View.TRANSLATION_Y, yTranslation); yAnim.setInterpolator(Interpolators.STANDARD_ACCELERATE); yAnim.setDuration(500); yAnim.start(); ObjectAnimator alphaAnim = ObjectAnimator.ofFloat(mView, View.ALPHA, 0f); anims.setInterpolator(Interpolators.STANDARD_ACCELERATE); anims.playTogether(alphaAnim, yAnim); anims.start(); } private void setupUserSwitcher() { Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +1 −6 Original line number Diff line number Diff line Loading @@ -636,17 +636,12 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard public void startAppearAnimation() { if (mCurrentSecurityMode != SecurityMode.None) { setAlpha(1f); mView.setAlpha(1f); mView.startAppearAnimation(mCurrentSecurityMode); getCurrentSecurityController().startAppearAnimation(); } } /** Set the alpha of the security container view */ public void setAlpha(float alpha) { mView.setAlpha(alpha); } public boolean startDisappearAnimation(Runnable onFinishRunnable) { boolean didRunAnimation = false; Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt +0 −28 Original line number Diff line number Diff line Loading @@ -80,9 +80,6 @@ interface KeyguardRepository { */ val isKeyguardShowing: Flow<Boolean> /** Is the keyguard in a unlocked state? */ val isKeyguardUnlocked: Flow<Boolean> /** Is an activity showing over the keyguard? */ val isKeyguardOccluded: Flow<Boolean> Loading Loading @@ -281,31 +278,6 @@ constructor( } .distinctUntilChanged() override val isKeyguardUnlocked: Flow<Boolean> = conflatedCallbackFlow { val callback = object : KeyguardStateController.Callback { override fun onUnlockedChanged() { trySendWithFailureLogging( keyguardStateController.isUnlocked, TAG, "updated isKeyguardUnlocked" ) } } keyguardStateController.addCallback(callback) // Adding the callback does not send an initial update. trySendWithFailureLogging( keyguardStateController.isUnlocked, TAG, "initial isKeyguardUnlocked" ) awaitClose { keyguardStateController.removeCallback(callback) } } .distinctUntilChanged() override val isKeyguardGoingAway: Flow<Boolean> = conflatedCallbackFlow { val callback = object : KeyguardStateController.Callback { Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt +8 −18 Original line number Diff line number Diff line Loading @@ -68,11 +68,8 @@ interface KeyguardTransitionRepository { /** * Begin a transition from one state to another. Transitions are interruptible, and will issue a * [TransitionStep] with state = [TransitionState.CANCELED] before beginning the next one. * * When canceled, there are two options: to continue from the current position of the prior * transition, or to reset the position. When [resetIfCanceled] == true, it will do the latter. */ fun startTransition(info: TransitionInfo, resetIfCanceled: Boolean = false): UUID? fun startTransition(info: TransitionInfo): UUID? /** * Allows manual control of a transition. When calling [startTransition], the consumer must pass Loading Loading @@ -133,10 +130,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio ) } override fun startTransition( info: TransitionInfo, resetIfCanceled: Boolean, ): UUID? { override fun startTransition(info: TransitionInfo): UUID? { if (lastStep.from == info.from && lastStep.to == info.to) { Log.i(TAG, "Duplicate call to start the transition, rejecting: $info") return null Loading @@ -144,11 +138,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio val startingValue = if (lastStep.transitionState != TransitionState.FINISHED) { Log.i(TAG, "Transition still active: $lastStep, canceling") if (resetIfCanceled) { 0f } else { lastStep.value } } else { 0f } Loading Loading @@ -237,7 +227,10 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio } private fun trace(step: TransitionStep, isManual: Boolean) { if (step.transitionState == TransitionState.RUNNING) { if ( step.transitionState != TransitionState.STARTED && step.transitionState != TransitionState.FINISHED ) { return } val traceName = Loading @@ -250,10 +243,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio val traceCookie = traceName.hashCode() if (step.transitionState == TransitionState.STARTED) { Trace.beginAsyncSection(traceName, traceCookie) } else if ( step.transitionState == TransitionState.FINISHED || step.transitionState == TransitionState.CANCELED ) { } else if (step.transitionState == TransitionState.FINISHED) { Trace.endAsyncSection(traceName, traceCookie) } } Loading Loading
packages/SystemUI/res-keyguard/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ <!-- The vertical margin between the date and the owner info. --> <!-- The translation for disappearing security views after having solved them. --> <dimen name="disappear_y_translation">-50dp</dimen> <dimen name="disappear_y_translation">-32dp</dimen> <!-- Dimens for animation for the Bouncer PIN view --> <dimen name="pin_view_trans_y_entry">120dp</dimen> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +7 −3 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ 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; Loading Loading @@ -1067,10 +1068,13 @@ public class KeyguardSecurityContainer extends ConstraintLayout { int yTranslation = mResources.getDimensionPixelSize(R.dimen.disappear_y_translation); AnimatorSet anims = new AnimatorSet(); ObjectAnimator yAnim = ObjectAnimator.ofFloat(mView, View.TRANSLATION_Y, yTranslation); yAnim.setInterpolator(Interpolators.STANDARD_ACCELERATE); yAnim.setDuration(500); yAnim.start(); ObjectAnimator alphaAnim = ObjectAnimator.ofFloat(mView, View.ALPHA, 0f); anims.setInterpolator(Interpolators.STANDARD_ACCELERATE); anims.playTogether(alphaAnim, yAnim); anims.start(); } private void setupUserSwitcher() { Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +1 −6 Original line number Diff line number Diff line Loading @@ -636,17 +636,12 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard public void startAppearAnimation() { if (mCurrentSecurityMode != SecurityMode.None) { setAlpha(1f); mView.setAlpha(1f); mView.startAppearAnimation(mCurrentSecurityMode); getCurrentSecurityController().startAppearAnimation(); } } /** Set the alpha of the security container view */ public void setAlpha(float alpha) { mView.setAlpha(alpha); } public boolean startDisappearAnimation(Runnable onFinishRunnable) { boolean didRunAnimation = false; Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt +0 −28 Original line number Diff line number Diff line Loading @@ -80,9 +80,6 @@ interface KeyguardRepository { */ val isKeyguardShowing: Flow<Boolean> /** Is the keyguard in a unlocked state? */ val isKeyguardUnlocked: Flow<Boolean> /** Is an activity showing over the keyguard? */ val isKeyguardOccluded: Flow<Boolean> Loading Loading @@ -281,31 +278,6 @@ constructor( } .distinctUntilChanged() override val isKeyguardUnlocked: Flow<Boolean> = conflatedCallbackFlow { val callback = object : KeyguardStateController.Callback { override fun onUnlockedChanged() { trySendWithFailureLogging( keyguardStateController.isUnlocked, TAG, "updated isKeyguardUnlocked" ) } } keyguardStateController.addCallback(callback) // Adding the callback does not send an initial update. trySendWithFailureLogging( keyguardStateController.isUnlocked, TAG, "initial isKeyguardUnlocked" ) awaitClose { keyguardStateController.removeCallback(callback) } } .distinctUntilChanged() override val isKeyguardGoingAway: Flow<Boolean> = conflatedCallbackFlow { val callback = object : KeyguardStateController.Callback { Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt +8 −18 Original line number Diff line number Diff line Loading @@ -68,11 +68,8 @@ interface KeyguardTransitionRepository { /** * Begin a transition from one state to another. Transitions are interruptible, and will issue a * [TransitionStep] with state = [TransitionState.CANCELED] before beginning the next one. * * When canceled, there are two options: to continue from the current position of the prior * transition, or to reset the position. When [resetIfCanceled] == true, it will do the latter. */ fun startTransition(info: TransitionInfo, resetIfCanceled: Boolean = false): UUID? fun startTransition(info: TransitionInfo): UUID? /** * Allows manual control of a transition. When calling [startTransition], the consumer must pass Loading Loading @@ -133,10 +130,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio ) } override fun startTransition( info: TransitionInfo, resetIfCanceled: Boolean, ): UUID? { override fun startTransition(info: TransitionInfo): UUID? { if (lastStep.from == info.from && lastStep.to == info.to) { Log.i(TAG, "Duplicate call to start the transition, rejecting: $info") return null Loading @@ -144,11 +138,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio val startingValue = if (lastStep.transitionState != TransitionState.FINISHED) { Log.i(TAG, "Transition still active: $lastStep, canceling") if (resetIfCanceled) { 0f } else { lastStep.value } } else { 0f } Loading Loading @@ -237,7 +227,10 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio } private fun trace(step: TransitionStep, isManual: Boolean) { if (step.transitionState == TransitionState.RUNNING) { if ( step.transitionState != TransitionState.STARTED && step.transitionState != TransitionState.FINISHED ) { return } val traceName = Loading @@ -250,10 +243,7 @@ class KeyguardTransitionRepositoryImpl @Inject constructor() : KeyguardTransitio val traceCookie = traceName.hashCode() if (step.transitionState == TransitionState.STARTED) { Trace.beginAsyncSection(traceName, traceCookie) } else if ( step.transitionState == TransitionState.FINISHED || step.transitionState == TransitionState.CANCELED ) { } else if (step.transitionState == TransitionState.FINISHED) { Trace.endAsyncSection(traceName, traceCookie) } } Loading