Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +8 −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,14 @@ 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(mUserSwitcherViewGroup, 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 +10 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard private View.OnKeyListener mOnKeyListener = (v, keyCode, event) -> interceptMediaKey(event); private ActivityStarter.OnDismissAction mDismissAction; private Runnable mCancelAction; private boolean mWillRunDismissFromKeyguard; private int mLastOrientation = Configuration.ORIENTATION_UNDEFINED; Loading Loading @@ -262,8 +263,10 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard // If there's a pending runnable because the user interacted with a widget // and we're leaving keyguard, then run it. boolean deferKeyguardDone = false; mWillRunDismissFromKeyguard = false; if (mDismissAction != null) { deferKeyguardDone = mDismissAction.onDismiss(); mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard(); mDismissAction = null; mCancelAction = null; } Loading Loading @@ -525,6 +528,13 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard return mDismissAction != null || mCancelAction != null; } /** * @return will the dismissal run from the keyguard layout (instead of from bouncer) */ public boolean willRunDismissFromKeyguard() { return mWillRunDismissFromKeyguard; } /** * Remove any dismiss action or cancel action that was set. */ Loading packages/SystemUI/src/com/android/systemui/keyguard/data/BouncerView.kt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ interface BouncerViewDelegate { cancelAction: Runnable?, ) fun willDismissWithActions(): Boolean fun willRunDismissFromKeyguard(): Boolean /** @return the {@link OnBackAnimationCallback} to animate Bouncer during a back gesture. */ fun getBackCallback(): OnBackAnimationCallback } packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt +5 −0 Original line number Diff line number Diff line Loading @@ -380,6 +380,11 @@ constructor( return primaryBouncerView.delegate?.willDismissWithActions() == true } /** Will the dismissal run from the keyguard layout (instead of from bouncer) */ fun willRunDismissFromKeyguard(): Boolean { return primaryBouncerView.delegate?.willRunDismissFromKeyguard() == true } /** Returns whether the bouncer should be full screen. */ private fun needsFullscreenBouncer(): Boolean { val mode: KeyguardSecurityModel.SecurityMode = Loading packages/SystemUI/src/com/android/systemui/keyguard/shared/model/ScrimAlpha.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.systemui.keyguard.shared.model /** Alpha values for scrim updates */ data class ScrimAlpha( val frontAlpha: Float = 0f, val behindAlpha: Float = 0f, val notificationsAlpha: Float = 0f, ) Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +8 −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,14 @@ 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(mUserSwitcherViewGroup, 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 +10 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard private View.OnKeyListener mOnKeyListener = (v, keyCode, event) -> interceptMediaKey(event); private ActivityStarter.OnDismissAction mDismissAction; private Runnable mCancelAction; private boolean mWillRunDismissFromKeyguard; private int mLastOrientation = Configuration.ORIENTATION_UNDEFINED; Loading Loading @@ -262,8 +263,10 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard // If there's a pending runnable because the user interacted with a widget // and we're leaving keyguard, then run it. boolean deferKeyguardDone = false; mWillRunDismissFromKeyguard = false; if (mDismissAction != null) { deferKeyguardDone = mDismissAction.onDismiss(); mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard(); mDismissAction = null; mCancelAction = null; } Loading Loading @@ -525,6 +528,13 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard return mDismissAction != null || mCancelAction != null; } /** * @return will the dismissal run from the keyguard layout (instead of from bouncer) */ public boolean willRunDismissFromKeyguard() { return mWillRunDismissFromKeyguard; } /** * Remove any dismiss action or cancel action that was set. */ Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/BouncerView.kt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ interface BouncerViewDelegate { cancelAction: Runnable?, ) fun willDismissWithActions(): Boolean fun willRunDismissFromKeyguard(): Boolean /** @return the {@link OnBackAnimationCallback} to animate Bouncer during a back gesture. */ fun getBackCallback(): OnBackAnimationCallback }
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt +5 −0 Original line number Diff line number Diff line Loading @@ -380,6 +380,11 @@ constructor( return primaryBouncerView.delegate?.willDismissWithActions() == true } /** Will the dismissal run from the keyguard layout (instead of from bouncer) */ fun willRunDismissFromKeyguard(): Boolean { return primaryBouncerView.delegate?.willRunDismissFromKeyguard() == true } /** Returns whether the bouncer should be full screen. */ private fun needsFullscreenBouncer(): Boolean { val mode: KeyguardSecurityModel.SecurityMode = Loading
packages/SystemUI/src/com/android/systemui/keyguard/shared/model/ScrimAlpha.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.systemui.keyguard.shared.model /** Alpha values for scrim updates */ data class ScrimAlpha( val frontAlpha: Float = 0f, val behindAlpha: Float = 0f, val notificationsAlpha: Float = 0f, )