Commit 3d87f18e authored by Kevin Strohbehn's avatar Kevin Strohbehn Committed by Commit Bot

Prevents hint animation from running eternally, even in tablet mode

Bug: 893218
Change-Id: I95f07482e66f0e30d77c2ebda94f6a47f2eb86e7
Reviewed-on: https://chromium-review.googlesource.com/c/1290000
Commit-Queue: Kevin Strohbehn <ginko@google.com>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Reviewed-by: default avatarWeidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601006}
parent 12d71af9
...@@ -113,7 +113,10 @@ ExpandArrowView::ExpandArrowView(ContentsView* contents_view, ...@@ -113,7 +113,10 @@ ExpandArrowView::ExpandArrowView(ContentsView* contents_view,
animation_->SetTweenType(gfx::Tween::LINEAR); animation_->SetTweenType(gfx::Tween::LINEAR);
animation_->SetSlideDuration(kCycleDurationInMs * 2 + kCycleIntervalInMs); animation_->SetSlideDuration(kCycleDurationInMs * 2 + kCycleIntervalInMs);
ResetHintingAnimation(); ResetHintingAnimation();
ScheduleHintingAnimation(true); // When side shelf or tablet mode is enabled, the peeking launcher won't be
// shown, so the hint animation is unnecessary.
if (!app_list_view_->is_side_shelf() && !app_list_view_->is_tablet_mode())
ScheduleHintingAnimation(true);
} }
ExpandArrowView::~ExpandArrowView() = default; ExpandArrowView::~ExpandArrowView() = default;
...@@ -325,7 +328,9 @@ void ExpandArrowView::AnimationProgressed(const gfx::Animation* animation) { ...@@ -325,7 +328,9 @@ void ExpandArrowView::AnimationProgressed(const gfx::Animation* animation) {
void ExpandArrowView::AnimationEnded(const gfx::Animation* /*animation*/) { void ExpandArrowView::AnimationEnded(const gfx::Animation* /*animation*/) {
ResetHintingAnimation(); ResetHintingAnimation();
if (!button_pressed_) // Only reschedule hinting animation if app list is not fullscreen. Once the
// user has made the app_list fullscreen, a hint to do so is no longer needed
if (!app_list_view_->is_fullscreen())
ScheduleHintingAnimation(false); ScheduleHintingAnimation(false);
} }
......
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