Commit ae8140f1 authored by David Black's avatar David Black Committed by Commit Bot

Fix Assistant timer notification crash.

The timer notification fires a deep link to initiate a text query
within Assistant to stop the firing timer.

The pending query was set before the view was fully initialized so
view state was not in sync with model state.

When this happened, we would eventually try promote the pending query
view to be the committed query view, but the pending query view did
not exist.

To fix this, we need to sync view state with the model state to ensure
that a pending query view always exists when there is a pending query
in the interaction model.

Bug: b:117771379
Change-Id: I7ad05836c95ffdd8973f11fae67051603dbfa76f
Reviewed-on: https://chromium-review.googlesource.com/c/1281169Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#600095}
parent da1977a3
......@@ -623,6 +623,10 @@ void AssistantMainStage::OnUiVisibilityChanged(
ui::LayerAnimationElement::AnimatableProperty::OPACITY,
kFooterEntryAnimationFadeInDelay),
CreateOpacityElement(1.f, kFooterEntryAnimationFadeInDuration)));
} else {
// A pending query is present so we simulate a change event to synchronize
// view state with interaction model state.
OnPendingQueryChanged(pending_query);
}
return;
......
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