[CrOS Hotspot] Update string for ongoing process notification
Screenshot: https://screenshot.googleplex.com/BReZqtViXsohSpV Bug: b/327483707 Change-Id: I750a5b911bc6522553b65edd6c37e1ac09f94f2a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5406536 Reviewed-by: Nikhil Nayunigari <nikhilcn@google.com> Reviewed-by: Alex Newcomer <newcomer@chromium.org> Commit-Queue: Jason Zhang <jiajunz@google.com> Reviewed-by: Kevin Radtke <kradtke@chromium.org> Cr-Commit-Position: refs/heads/main@{#1280824}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
a33d0c6f0e
commit
38305fcd63
ash
ash_strings.grd
ash_strings_grd
IDS_ASH_HOTSPOT_ON_MESSAGE_MULTIPLE_CONNECTED_DEVICES_NOTIFICATION.png.sha1IDS_ASH_HOTSPOT_ON_MESSAGE_NO_CONNECTED_DEVICES_NOTIFICATION.png.sha1IDS_ASH_HOTSPOT_ON_MESSAGE_ONE_CONNECTED_DEVICE_NOTIFICATION.png.sha1IDS_ASH_HOTSPOT_ON_TITLE.png.sha1IDS_ASH_TURN_OFF_HOTSPOT_LABEL.png.sha1
system
@ -3136,7 +3136,7 @@ Some features are limited to increase battery life.
|
||||
<ph name="DEVICE_NAME">$1<ex>Chromebook</ex></ph> hotspot is on, no devices connected
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_ON_TITLE" desc="Title used for the system notification shown when the hotspot is turned on.">
|
||||
With hotspot on, Wi-Fi is off
|
||||
Hotspot is on (Wi-Fi is off)
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_ON_MESSAGE_MULTIPLE_CONNECTED_DEVICES" desc="Message displayed in the notification when hotspot is turned on and multiple devices are connected.">
|
||||
<ph name="DEVICECOUNT">$1</ph> devices connected
|
||||
@ -3145,16 +3145,19 @@ Some features are limited to increase battery life.
|
||||
1 device connected
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_ON_MESSAGE_NO_CONNECTED_DEVICES_NOTIFICATION" desc="Message displayed in the notification when hotspot is turned on and no devices are connected.">
|
||||
No devices connected. While using hotspot, Wi-Fi will stay off.
|
||||
This may incur data cost.
|
||||
No devices connected.
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_ON_MESSAGE_MULTIPLE_CONNECTED_DEVICES_NOTIFICATION" desc="Message displayed in the notification when hotspot is turned on and multiple devices are connected.">
|
||||
<ph name="DEVICECOUNT">$1</ph> devices connected. While using hotspot, Wi-Fi will stay off.
|
||||
This may incur data cost.
|
||||
<ph name="DEVICECOUNT">$1</ph> devices connected.
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_ON_MESSAGE_ONE_CONNECTED_DEVICE_NOTIFICATION" desc="Message displayed in the notification when hotspot is turned on and one device is connected.">
|
||||
1 device connected. While using hotspot, Wi-Fi will stay off.
|
||||
This may incur data cost.
|
||||
1 device connected.
|
||||
</message>
|
||||
<message name="IDS_ASH_TURN_OFF_HOTSPOT_LABEL" desc="The label for button used to turn off hotspot.">
|
||||
Turn off hotspot
|
||||
Turn off
|
||||
</message>
|
||||
<message name="IDS_ASH_HOTSPOT_OFF_TITLE" desc="Title used for the system notification shown when the hotspot is turned off.">
|
||||
Hotspot is off
|
||||
|
@ -1 +1 @@
|
||||
3e5b948d216121a750c047e6ba20d33fe76f0ddd
|
||||
126c79b0d623358eff0ee2aecdf53cb5a897f9b0
|
@ -1 +1 @@
|
||||
167bbace32f85db9c014f9b837dd3a1b97b427f5
|
||||
affab3ec35f77811ebcc9feffb65f9e4e7308019
|
@ -1 +1 @@
|
||||
fee146bfb5d14f0f25b81894d90a11a865615937
|
||||
e39c9d94bff7f02b0c4ff148227d76f9a287ba97
|
@ -1 +1 @@
|
||||
167bbace32f85db9c014f9b837dd3a1b97b427f5
|
||||
126c79b0d623358eff0ee2aecdf53cb5a897f9b0
|
@ -1 +1 @@
|
||||
167bbace32f85db9c014f9b837dd3a1b97b427f5
|
||||
126c79b0d623358eff0ee2aecdf53cb5a897f9b0
|
@ -7,6 +7,7 @@
|
||||
#include "ash/public/cpp/hotspot_config_service.h"
|
||||
#include "ash/public/cpp/network_config_service.h"
|
||||
#include "ash/public/cpp/notification_utils.h"
|
||||
#include "ash/resources/vector_icons/vector_icons.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
@ -105,7 +106,7 @@ void HotspotNotifier::OnHotspotTurnedOff(
|
||||
std::unique_ptr<message_center::Notification> notification =
|
||||
CreateNotification(l10n_util::GetStringUTF16(title_id),
|
||||
l10n_util::GetStringUTF16(message_id), notification_id,
|
||||
delegate);
|
||||
/*use_hotspot_icon=*/false, delegate);
|
||||
|
||||
if (notification_actions.size() > 0) {
|
||||
notification->set_buttons(notification_actions);
|
||||
@ -171,7 +172,7 @@ void HotspotNotifier::OnGetHotspotInfo(
|
||||
l10n_util::GetStringUTF16(IDS_ASH_TURN_OFF_HOTSPOT_LABEL)));
|
||||
std::unique_ptr<message_center::Notification> notification =
|
||||
CreateNotification(title, message, kHotspotTurnedOnNotificationId,
|
||||
delegate);
|
||||
/*use_hotspot_icon=*/true, delegate);
|
||||
notification->set_pinned(/*pinned=*/true);
|
||||
notification->set_buttons(notification_actions);
|
||||
message_center->AddNotification(std::move(notification));
|
||||
@ -261,7 +262,10 @@ HotspotNotifier::CreateNotification(
|
||||
const std::u16string& title_id,
|
||||
const std::u16string& message_id,
|
||||
const char* notification_id,
|
||||
const bool use_hotspot_icon,
|
||||
scoped_refptr<message_center::NotificationDelegate> delegate) {
|
||||
const gfx::VectorIcon& icon =
|
||||
use_hotspot_icon ? kHotspotOnIcon : gfx::kNoneIcon;
|
||||
std::unique_ptr<message_center::Notification> notification =
|
||||
ash::CreateSystemNotificationPtr(
|
||||
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title_id,
|
||||
@ -271,7 +275,7 @@ HotspotNotifier::CreateNotification(
|
||||
message_center::NotifierType::SYSTEM_COMPONENT, kNotifierHotspot,
|
||||
NotificationCatalogName::kHotspot),
|
||||
message_center::RichNotificationData(), delegate,
|
||||
/*small_image=*/gfx::VectorIcon(),
|
||||
/*small_image=*/icon,
|
||||
message_center::SystemNotificationWarningLevel::NORMAL);
|
||||
|
||||
return notification;
|
||||
|
@ -67,6 +67,7 @@ class ASH_EXPORT HotspotNotifier
|
||||
const std::u16string& title_id,
|
||||
const std::u16string& message_id,
|
||||
const char* notification_id,
|
||||
const bool use_hotspot_icon,
|
||||
scoped_refptr<message_center::NotificationDelegate> delegate);
|
||||
|
||||
void EnableHotspotHandler(const char* notification_id,
|
||||
|
Reference in New Issue
Block a user