Merge "fix(hct): Hardcode the names of Outline text and HCT in our notif." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
b9f1396ddc
@@ -5574,8 +5574,8 @@
|
||||
<string name="accessibility_toggle_high_text_contrast_preference_summary">Change text color to black or white. Maximizes contrast with the background.</string>
|
||||
<!-- Title for the notification that high contrast text has been replaced. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_notification_high_contrast_text_title">Improve text contrast</string>
|
||||
<!-- Text content for the notification that high contrast text has been replaced. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_notification_high_contrast_text_body"><xliff:g example="Outline text" id="outline_text">%1$s</xliff:g> has replaced <xliff:g example="high contrast text" id="high_contrast_text">%2$s</xliff:g>. You can turn it on in <xliff:g example="Settings" id="settings">%3$s</xliff:g>.</string>
|
||||
<!-- Text content for the notification that the accessibility feature called "high contrast text" has been replaced by a new feature called "outline text". [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_notification_high_contrast_text_body_message">Outline text has replaced high contrast text. You can turn it on in <xliff:g example="Settings" id="settings">%1$s</xliff:g>.</string>
|
||||
<!-- Action for the notification to high contrast text to open the Settings app. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_notification_high_contrast_text_action_open_settings">Go to <xliff:g example="Settings" id="settings">%1$s</xliff:g></string>
|
||||
<!-- Title for the accessibility preference that adds an outline behind text to increase contrast and legibility. [CHAR LIMIT=35] -->
|
||||
|
@@ -43,7 +43,6 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Handling smooth migration to the new high contrast text appearance
|
||||
@@ -134,15 +133,10 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
private String getNotificationContentText(Context context) {
|
||||
final String newName = context.getString(
|
||||
R.string.accessibility_toggle_maximize_text_contrast_preference_title);
|
||||
final String oldName = context.getString(
|
||||
R.string.accessibility_toggle_high_text_contrast_preference_title)
|
||||
.toLowerCase(Locale.getDefault());
|
||||
final String settingsAppName = context.getString(R.string.settings_label);
|
||||
return context.getString(
|
||||
R.string.accessibility_notification_high_contrast_text_body,
|
||||
newName, oldName, settingsAppName);
|
||||
R.string.accessibility_notification_high_contrast_text_body_message,
|
||||
settingsAppName);
|
||||
}
|
||||
|
||||
private void showNotification(Context context) {
|
||||
|
Reference in New Issue
Block a user