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
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5a408d2..8e5e04f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -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] -->
diff --git a/res/xml/accessibility_color_contrast.xml b/res/xml/accessibility_color_contrast.xml
index ffa8072..c33c5ef 100644
--- a/res/xml/accessibility_color_contrast.xml
+++ b/res/xml/accessibility_color_contrast.xml
@@ -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" />
diff --git a/res/xml/accessibility_text_reading_options.xml b/res/xml/accessibility_text_reading_options.xml
index 8eed107..40201f0 100644
--- a/res/xml/accessibility_text_reading_options.xml
+++ b/res/xml/accessibility_text_reading_options.xml
@@ -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"
diff --git a/src/com/android/settings/accessibility/HighContrastTextMigrationReceiver.java b/src/com/android/settings/accessibility/HighContrastTextMigrationReceiver.java
index ee3537b..7743a1f 100644
--- a/src/com/android/settings/accessibility/HighContrastTextMigrationReceiver.java
+++ b/src/com/android/settings/accessibility/HighContrastTextMigrationReceiver.java
@@ -49,7 +49,7 @@
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 @@
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 @@
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());
diff --git a/tests/robotests/src/com/android/settings/accessibility/HighContrastTextMigrationReceiverTest.java b/tests/robotests/src/com/android/settings/accessibility/HighContrastTextMigrationReceiverTest.java
index 0fedddc..1b66393 100644
--- a/tests/robotests/src/com/android/settings/accessibility/HighContrastTextMigrationReceiverTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/HighContrastTextMigrationReceiverTest.java
@@ -203,7 +203,7 @@
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));