Commit 5bb0f5f8 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Fade shelf out first in UnlockAnimationBeforeUIDestroyed

When running UnlockAnimationBeforUIDestroyed, animate shelf before
lock screen containers. Shelf fades out and then fades in when the
unlock animation completes - i.e. in the
UnlockAnimationBeforeUIDestroyed callback. If animations run
immediately, the fade out and fade in animation order could get reversed
if fade out animation is started after the part of unlock animation to
which animation callback is passed.

I'm not sure that this is actually the root cause for the linked issue,
but it is a way to get to an invisible shelf (it requires zero length
animation, which may happen during screen rotation).

BUG=1106796

Change-Id: I8f26200666e742b249ba96b64a32ce28022634f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352905Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798145}
parent 659cb7c2
......@@ -368,15 +368,15 @@ void LockStateController::StartPostLockAnimation() {
void LockStateController::StartUnlockAnimationBeforeUIDestroyed(
base::OnceClosure callback) {
VLOG(1) << "StartUnlockAnimationBeforeUIDestroyed";
animator_->StartAnimationWithCallback(
SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
SessionStateAnimator::ANIMATION_LIFT,
SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, std::move(callback));
// Hide the lock screen shelf. This is a no-op if views-based shelf is
// disabled, since shelf is in NonLockScreenContainersContainer.
animator_->StartAnimation(SessionStateAnimator::SHELF,
SessionStateAnimator::ANIMATION_FADE_OUT,
SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS);
animator_->StartAnimationWithCallback(
SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
SessionStateAnimator::ANIMATION_LIFT,
SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, std::move(callback));
}
void LockStateController::StartUnlockAnimationAfterUIDestroyed() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment