Strings updates for the new version of High contrast text.

These strings may be replaced again after our UX Writing team provides
new strings for the final public release.

Bug: 384791485
Test: observe new strings; see http://b/384791485#comment2
Flag: EXEMPT strings changes
Change-Id: I5359bc3d6faca84238fe00801a5d68e5ef8ffc2f
This commit is contained in:
Daniel Norman
2024-12-18 20:40:30 +00:00
parent 74b1086f23
commit d6e53163fd
5 changed files with 12 additions and 11 deletions

View File

@@ -5415,8 +5415,10 @@
<string name="accessibility_toggle_high_text_contrast_preference_title">High contrast text</string>
<!-- Summary for the accessibility preference to high contrast text. [CHAR LIMIT=NONE] -->
<string name="accessibility_toggle_high_text_contrast_preference_summary">Change text color to black or white. Maximizes contrast with the background.</string>
<!-- Content for the notification to high contrast text. [CHAR LIMIT=NONE] -->
<string name="accessibility_notification_high_contrast_text_content">High contrast text has a new look and feel.</string>
<!-- Title for the notification that high contrast text has been replaced. [CHAR LIMIT=NONE] -->
<string name="accessibility_notification_high_contrast_text_title">High contrast text has been replaced</string>
<!-- Text content for the notification that high contrast text has been replaced. [CHAR LIMIT=NONE] -->
<string name="accessibility_notification_high_contrast_text_content">Try Maximize text contrast instead. Find it in Settings.</string>
<!-- Action for the notification to high contrast text. [CHAR LIMIT=35] -->
<string name="accessibility_notification_high_contrast_text_action">Open Settings</string>
<!-- Title for the accessibility preference to high contrast text. [CHAR LIMIT=35] -->

View File

@@ -33,8 +33,8 @@
<SwitchPreferenceCompat
android:key="toggle_high_text_contrast_preference"
android:persistent="false"
android:summary="@string/accessibility_toggle_high_text_contrast_preference_summary"
android:title="@string/accessibility_toggle_high_text_contrast_preference_title"
android:title="@string/accessibility_toggle_maximize_text_contrast_preference_title"
android:summary="@string/accessibility_toggle_maximize_text_contrast_preference_summary"
settings:controller=
"com.android.settings.accessibility.HighTextContrastPreferenceController" />

View File

@@ -56,8 +56,8 @@
<SwitchPreferenceCompat
android:key="toggle_high_text_contrast_preference"
android:persistent="false"
android:summary="@string/accessibility_toggle_high_text_contrast_preference_summary"
android:title="@string/accessibility_toggle_high_text_contrast_preference_title" />
android:title="@string/accessibility_toggle_maximize_text_contrast_preference_title"
android:summary="@string/accessibility_toggle_maximize_text_contrast_preference_summary" />
<com.android.settings.accessibility.TextReadingResetPreference
android:key="reset"

View File

@@ -49,7 +49,7 @@ import java.lang.annotation.RetentionPolicy;
public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
private static final String TAG = HighContrastTextMigrationReceiver.class.getSimpleName();
@VisibleForTesting
static final String NOTIFICATION_CHANNEL = "high_contrast_text_notification_channel";
static final String NOTIFICATION_CHANNEL = "accessibility_notification_channel";
@VisibleForTesting
static final String ACTION_RESTORED =
"com.android.settings.accessibility.ACTION_HIGH_CONTRAST_TEXT_RESTORED";
@@ -120,7 +120,7 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
NOTIFICATION_CHANNEL)
.setSmallIcon(R.drawable.ic_settings_24dp)
.setContentTitle(context.getString(
R.string.accessibility_toggle_high_text_contrast_preference_title))
R.string.accessibility_notification_high_contrast_text_title))
.setContentText(context.getString(
R.string.accessibility_notification_high_contrast_text_content))
.setAutoCancel(true);
@@ -149,8 +149,7 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
context.getSystemService(NotificationManager.class);
NotificationChannel notificationChannel = new NotificationChannel(
NOTIFICATION_CHANNEL,
context.getString(
R.string.accessibility_toggle_high_text_contrast_preference_title),
context.getString(R.string.accessibility_settings),
NotificationManager.IMPORTANCE_LOW);
notificationManager.createNotificationChannel(notificationChannel);
notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build());

View File

@@ -203,7 +203,7 @@ public class HighContrastTextMigrationReceiverTest {
ShadowNotification shadowNotification = Shadows.shadowOf(notification);
assertThat(shadowNotification.getContentTitle()).isEqualTo(mContext.getString(
R.string.accessibility_toggle_high_text_contrast_preference_title));
R.string.accessibility_notification_high_contrast_text_title));
assertThat(shadowNotification.getContentText()).isEqualTo(
mContext.getString(R.string.accessibility_notification_high_contrast_text_content));