Commit 0756ad8c authored by wutao's avatar wutao Committed by Commit Bot

assistant: Add stop button to timer notification

This cl add a STOP button to timer notification.

Bug: b/118655426
Test: manual
Change-Id: I88752010e4b0c5be54debddb8394827a798d65fe
Reviewed-on: https://chromium-review.googlesource.com/c/1330296Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607007}
parent fa321829
...@@ -136,6 +136,9 @@ Try tapping the mic to ask me anything. ...@@ -136,6 +136,9 @@ Try tapping the mic to ask me anything.
<message name="IDS_ASSISTANT_STOP_TIMER_QUERY" desc="Query for stopping assistant timer."> <message name="IDS_ASSISTANT_STOP_TIMER_QUERY" desc="Query for stopping assistant timer.">
Stop timer Stop timer
</message> </message>
<message name="IDS_ASSISTANT_STOP_BUTTON_TEXT" desc="Text shown on stop button in Assistant timer notification.">
STOP
</message>
<!-- The following strings are located here for accessibility from both //ash and //chrome --> <!-- The following strings are located here for accessibility from both //ash and //chrome -->
<message name="IDS_ENABLE_BLUETOOTH" desc="The message to display in the network list when Tether is enabled but Bluetooth is disabled."> <message name="IDS_ENABLE_BLUETOOTH" desc="The message to display in the network list when Tether is enabled but Bluetooth is disabled.">
......
...@@ -914,15 +914,18 @@ void AssistantManagerServiceImpl::OnTimerSoundingStarted() { ...@@ -914,15 +914,18 @@ void AssistantManagerServiceImpl::OnTimerSoundingStarted() {
const std::string stop_timer_query = const std::string stop_timer_query =
l10n_util::GetStringUTF8(IDS_ASSISTANT_STOP_TIMER_QUERY); l10n_util::GetStringUTF8(IDS_ASSISTANT_STOP_TIMER_QUERY);
const std::string action_url = kQueryDeeplinkPrefix + stop_timer_query;
action::Notification notification( action::Notification notification(
/*title=*/notification_title, /*title=*/notification_title,
/*text=*/notification_content, /*text=*/notification_content,
/*action_url=*/kQueryDeeplinkPrefix + stop_timer_query, /*action_url=*/action_url,
/*notification_id=*/{}, /*notification_id=*/{},
/*consistency_token=*/{}, /*consistency_token=*/{},
/*opaque_token=*/{}, /*opaque_token=*/{},
/*grouping_key=*/kTimerFireNotificationGroupId, /*grouping_key=*/kTimerFireNotificationGroupId,
/*obfuscated_gaia_id=*/{}); /*obfuscated_gaia_id=*/{},
/*buttons=*/
{{l10n_util::GetStringUTF8(IDS_ASSISTANT_STOP_BUTTON_TEXT), action_url}});
OnShowNotification(notification); OnShowNotification(notification);
} }
......
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