Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV mDozeParameters = dozeParameters; mKeyguardStateController = keyguardStateController; mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ true); mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mSmartspaceTransitionController = smartspaceTransitionController; Loading packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java +22 −16 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.keyguard; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import android.view.View; import android.view.ViewPropertyAnimator; import com.android.systemui.animation.Interpolators; import com.android.systemui.statusbar.StatusBarState; Loading @@ -40,6 +41,7 @@ public class KeyguardVisibilityHelper { private final KeyguardStateController mKeyguardStateController; private final DozeParameters mDozeParameters; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private boolean mAnimateYPos; private boolean mKeyguardViewVisibilityAnimating; private boolean mLastOccludedState = false; private final AnimationProperties mAnimationProperties = new AnimationProperties(); Loading @@ -47,11 +49,13 @@ public class KeyguardVisibilityHelper { public KeyguardVisibilityHelper(View view, KeyguardStateController keyguardStateController, DozeParameters dozeParameters, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) { UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, boolean animateYPos) { mView = view; mKeyguardStateController = keyguardStateController; mDozeParameters = dozeParameters; mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; mAnimateYPos = animateYPos; } public boolean isVisibilityAnimating() { Loading Loading @@ -98,23 +102,25 @@ public class KeyguardVisibilityHelper { } else if (statusBarState == KEYGUARD) { if (keyguardFadingAway) { mKeyguardViewVisibilityAnimating = true; ViewPropertyAnimator animator = mView.animate() .alpha(0) .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN) .withEndAction(mAnimateKeyguardStatusViewInvisibleEndRunnable); if (mAnimateYPos) { float target = mView.getY() - mView.getHeight() * 0.05f; int delay = 0; int duration = 125; // We animate the Y properly separately using the PropertyAnimator, as the panel // view als needs to update the end position. // We animate the Y property separately using the PropertyAnimator, as the panel // view also needs to update the end position. mAnimationProperties.setDuration(duration).setDelay(delay); PropertyAnimator.cancelAnimation(mView, AnimatableProperty.Y); PropertyAnimator.setProperty(mView, AnimatableProperty.Y, target, mAnimationProperties, true /* animate */); mView.animate() .alpha(0) .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN) .setDuration(duration) .setStartDelay(delay) .withEndAction(mAnimateKeyguardStatusViewInvisibleEndRunnable) .start(); animator.setDuration(duration) .setStartDelay(delay); } animator.start(); } else if (mLastOccludedState && !isOccluded) { // An activity was displayed over the lock screen, and has now gone away mView.setVisibility(View.VISIBLE); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java +2 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,8 @@ public class KeyguardQsUserSwitchController extends ViewController<UserAvatarVie mConfigurationController = configurationController; mStatusBarStateController = statusBarStateController; mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); keyguardStateController, dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ false); mUserDetailAdapter = new KeyguardUserDetailAdapter(context, userDetailViewAdapterProvider); } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java +2 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,8 @@ public class KeyguardUserSwitcherController extends ViewController<KeyguardUserS mAdapter = new KeyguardUserAdapter(mContext, resources, layoutInflater, mUserSwitcherController, this); mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); keyguardStateController, dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ false); mBackground = new KeyguardUserSwitcherScrim(context); } Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV mDozeParameters = dozeParameters; mKeyguardStateController = keyguardStateController; mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ true); mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mSmartspaceTransitionController = smartspaceTransitionController; Loading
packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java +22 −16 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.keyguard; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import android.view.View; import android.view.ViewPropertyAnimator; import com.android.systemui.animation.Interpolators; import com.android.systemui.statusbar.StatusBarState; Loading @@ -40,6 +41,7 @@ public class KeyguardVisibilityHelper { private final KeyguardStateController mKeyguardStateController; private final DozeParameters mDozeParameters; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; private boolean mAnimateYPos; private boolean mKeyguardViewVisibilityAnimating; private boolean mLastOccludedState = false; private final AnimationProperties mAnimationProperties = new AnimationProperties(); Loading @@ -47,11 +49,13 @@ public class KeyguardVisibilityHelper { public KeyguardVisibilityHelper(View view, KeyguardStateController keyguardStateController, DozeParameters dozeParameters, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) { UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, boolean animateYPos) { mView = view; mKeyguardStateController = keyguardStateController; mDozeParameters = dozeParameters; mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; mAnimateYPos = animateYPos; } public boolean isVisibilityAnimating() { Loading Loading @@ -98,23 +102,25 @@ public class KeyguardVisibilityHelper { } else if (statusBarState == KEYGUARD) { if (keyguardFadingAway) { mKeyguardViewVisibilityAnimating = true; ViewPropertyAnimator animator = mView.animate() .alpha(0) .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN) .withEndAction(mAnimateKeyguardStatusViewInvisibleEndRunnable); if (mAnimateYPos) { float target = mView.getY() - mView.getHeight() * 0.05f; int delay = 0; int duration = 125; // We animate the Y properly separately using the PropertyAnimator, as the panel // view als needs to update the end position. // We animate the Y property separately using the PropertyAnimator, as the panel // view also needs to update the end position. mAnimationProperties.setDuration(duration).setDelay(delay); PropertyAnimator.cancelAnimation(mView, AnimatableProperty.Y); PropertyAnimator.setProperty(mView, AnimatableProperty.Y, target, mAnimationProperties, true /* animate */); mView.animate() .alpha(0) .setInterpolator(Interpolators.FAST_OUT_LINEAR_IN) .setDuration(duration) .setStartDelay(delay) .withEndAction(mAnimateKeyguardStatusViewInvisibleEndRunnable) .start(); animator.setDuration(duration) .setStartDelay(delay); } animator.start(); } else if (mLastOccludedState && !isOccluded) { // An activity was displayed over the lock screen, and has now gone away mView.setVisibility(View.VISIBLE); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java +2 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,8 @@ public class KeyguardQsUserSwitchController extends ViewController<UserAvatarVie mConfigurationController = configurationController; mStatusBarStateController = statusBarStateController; mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); keyguardStateController, dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ false); mUserDetailAdapter = new KeyguardUserDetailAdapter(context, userDetailViewAdapterProvider); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardUserSwitcherController.java +2 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,8 @@ public class KeyguardUserSwitcherController extends ViewController<KeyguardUserS mAdapter = new KeyguardUserAdapter(mContext, resources, layoutInflater, mUserSwitcherController, this); mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController, dozeParameters, unlockedScreenOffAnimationController); keyguardStateController, dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ false); mBackground = new KeyguardUserSwitcherScrim(context); } Loading