[Phone Hub] Add shorter Phone Hub quick action title strings
This change adds shorter strings to Phone Hub quick action pods titles and put behind a flag. Flag on: https://screenshot.googleplex.com/7tVNRnzvnTgj3CB.png Flag off: https://screenshot.googleplex.com/EBB3BJrQU9VssRr.png Test: deployed to DUT and verified that strings are updated. Fixed: b/308168048 Change-Id: I15e2057b406b0e236e183efa4419b309aff13ecc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5100956 Reviewed-by: Jon Mann <jonmann@chromium.org> Commit-Queue: Pu Shi <pushi@google.com> Cr-Commit-Position: refs/heads/main@{#1239846}
This commit is contained in:
@ -1796,6 +1796,15 @@ Style notes:
|
||||
<message name="IDS_ASH_PHONE_HUB_LOCATE_PHONE_TITLE" desc="Title of the locate phone toggle in the phone hub bubble.">
|
||||
Locate phone
|
||||
</message>
|
||||
<message name="IDS_ASH_PHONE_HUB_ENABLE_HOTSPOT_SHORTENED_TITLE" desc="Short version of title of the enable hotspot toggle in the phone hub bubble.">
|
||||
Hotspot
|
||||
</message>
|
||||
<message name="IDS_ASH_PHONE_HUB_SILENCE_PHONE_SHORTENED_TITLE" desc="Short version of title of the silence phone toggle in the phone hub bubble.">
|
||||
Silence
|
||||
</message>
|
||||
<message name="IDS_ASH_PHONE_HUB_LOCATE_PHONE_SHORTENED_TITLE" desc="Short version of title of the locate phone toggle in the phone hub bubble.">
|
||||
Locate
|
||||
</message>
|
||||
<message name="IDS_ASH_PHONE_HUB_QUICK_ACTIONS_TOGGLE_TOOLTIP" desc="The tooltip text used for the button in phone hube bubble to toggle quick actions feature on or off.">
|
||||
Toggle <ph name="FEATURE_NAME">$1<ex>Silence</ex></ph>. <ph name="STATE_TEXT">$2<ex>Silence is on.</ex></ph>
|
||||
</message>
|
||||
|
@ -0,0 +1 @@
|
||||
aec7450a647bf3d5d84f4a5745b784a0dd89325c
|
@ -0,0 +1 @@
|
||||
aec7450a647bf3d5d84f4a5745b784a0dd89325c
|
@ -0,0 +1 @@
|
||||
aec7450a647bf3d5d84f4a5745b784a0dd89325c
|
@ -2169,6 +2169,10 @@ BASE_FEATURE(kPhoneHubPingOnBubbleOpen,
|
||||
const base::FeatureParam<base::TimeDelta> kPhoneHubPingTimeout{
|
||||
&kPhoneHubPingOnBubbleOpen, "PhoneHubPingTimeout", base::Seconds(5)};
|
||||
|
||||
BASE_FEATURE(kPhoneHubShortQuickActionPodsTitles,
|
||||
"PhoneHubShortQuickActionPodsTitles",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPine, "Pine", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// Enables the new picker feature.
|
||||
@ -4021,6 +4025,10 @@ bool IsPhoneHubCallNotificationEnabled() {
|
||||
return base::FeatureList::IsEnabled(kPhoneHubCallNotification);
|
||||
}
|
||||
|
||||
bool IsPhoneHubShortQuickActionPodsTitlesEnabled() {
|
||||
return base::FeatureList::IsEnabled(kPhoneHubShortQuickActionPodsTitles);
|
||||
}
|
||||
|
||||
bool IsPickerUpdateEnabled() {
|
||||
return base::FeatureList::IsEnabled(kPicker);
|
||||
}
|
||||
|
@ -674,6 +674,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kPhoneHubPingOnBubbleOpen);
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
extern const base::FeatureParam<base::TimeDelta> kPhoneHubPingTimeout;
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kPhoneHubShortQuickActionPodsTitles);
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPicker);
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPine);
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kPipDoubleTapToResize);
|
||||
@ -1161,6 +1163,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
bool IsPhoneHubOnboardingNotifierRevampEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
bool IsPhoneHubPingOnBubbleOpenEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS)
|
||||
bool IsPhoneHubShortQuickActionPodsTitlesEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPhoneHubEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPhoneHubAttestationRetriesEnabled();
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPhoneHubCallNotificationEnabled();
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "ash/system/phonehub/enable_hotspot_quick_action_controller.h"
|
||||
|
||||
#include "ash/constants/ash_features.h"
|
||||
#include "ash/resources/vector_icons/vector_icons.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "ash/style/ash_color_provider.h"
|
||||
@ -32,8 +33,12 @@ EnableHotspotQuickActionController::~EnableHotspotQuickActionController() {
|
||||
|
||||
QuickActionItem* EnableHotspotQuickActionController::CreateItem() {
|
||||
DCHECK(!item_);
|
||||
item_ = new QuickActionItem(this, IDS_ASH_PHONE_HUB_ENABLE_HOTSPOT_TITLE,
|
||||
kPhoneHubEnableHotspotIcon);
|
||||
item_ = new QuickActionItem(
|
||||
this,
|
||||
features::IsPhoneHubShortQuickActionPodsTitlesEnabled()
|
||||
? IDS_ASH_PHONE_HUB_ENABLE_HOTSPOT_SHORTENED_TITLE
|
||||
: IDS_ASH_PHONE_HUB_ENABLE_HOTSPOT_TITLE,
|
||||
kPhoneHubEnableHotspotIcon);
|
||||
OnTetherStatusChanged();
|
||||
return item_;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "ash/system/phonehub/locate_phone_quick_action_controller.h"
|
||||
|
||||
#include "ash/constants/ash_features.h"
|
||||
#include "ash/resources/vector_icons/vector_icons.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "ash/system/phonehub/phone_hub_metrics.h"
|
||||
@ -40,8 +41,12 @@ LocatePhoneQuickActionController::~LocatePhoneQuickActionController() {
|
||||
|
||||
QuickActionItem* LocatePhoneQuickActionController::CreateItem() {
|
||||
DCHECK(!item_);
|
||||
item_ = new QuickActionItem(this, IDS_ASH_PHONE_HUB_LOCATE_PHONE_TITLE,
|
||||
kPhoneHubLocatePhoneIcon);
|
||||
item_ = new QuickActionItem(
|
||||
this,
|
||||
features::IsPhoneHubShortQuickActionPodsTitlesEnabled()
|
||||
? IDS_ASH_PHONE_HUB_LOCATE_PHONE_SHORTENED_TITLE
|
||||
: IDS_ASH_PHONE_HUB_LOCATE_PHONE_TITLE,
|
||||
kPhoneHubLocatePhoneIcon);
|
||||
OnPhoneRingingStateChanged();
|
||||
return item_;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "ash/system/phonehub/silence_phone_quick_action_controller.h"
|
||||
|
||||
#include "ash/constants/ash_features.h"
|
||||
#include "ash/resources/vector_icons/vector_icons.h"
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "ash/system/phonehub/phone_hub_metrics.h"
|
||||
@ -42,8 +43,12 @@ bool SilencePhoneQuickActionController::IsItemEnabled() {
|
||||
|
||||
QuickActionItem* SilencePhoneQuickActionController::CreateItem() {
|
||||
DCHECK(!item_);
|
||||
item_ = new QuickActionItem(this, IDS_ASH_PHONE_HUB_SILENCE_PHONE_TITLE,
|
||||
kPhoneHubSilencePhoneIcon);
|
||||
item_ = new QuickActionItem(
|
||||
this,
|
||||
features::IsPhoneHubShortQuickActionPodsTitlesEnabled()
|
||||
? IDS_ASH_PHONE_HUB_SILENCE_PHONE_SHORTENED_TITLE
|
||||
: IDS_ASH_PHONE_HUB_SILENCE_PHONE_TITLE,
|
||||
kPhoneHubSilencePhoneIcon);
|
||||
item_->icon_button()->SetButtonBehavior(
|
||||
FeaturePodIconButton::DisabledButtonBehavior::
|
||||
kCanDisplayDisabledToggleValue);
|
||||
|
Reference in New Issue
Block a user