Commit 893ae0e1 authored by David Black's avatar David Black Committed by Commit Bot

Enforce settings_enabled check for Assistant.

We should not show Assistant UI when the Assistant has been disabled in
Chrome OS settings.

This reverts a change made in:
https://chromium-review.googlesource.com/c/chromium/src/+/1141346

Bug: b:111704810
Change-Id: Ic8ede48f0637efbc7520df7e1223964554055aef
Reviewed-on: https://chromium-review.googlesource.com/1146151
Commit-Queue: David Black <dmblack@google.com>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarYue Li <updowndota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577643}
parent b0f248cd
......@@ -211,6 +211,9 @@ void AssistantUiController::OnUiVisibilityChanged(bool visible,
}
void AssistantUiController::ShowUi(AssistantSource source) {
if (!Shell::Get()->voice_interaction_controller()->settings_enabled())
return;
if (!assistant_) {
ShowToast(kUnboundServiceToastId, IDS_ASH_ASSISTANT_ERROR_GENERIC);
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