Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b3ccd0 authored by Daniel Norman's avatar Daniel Norman
Browse files

fix(high contrast text): Uses a new string resource for the settings action.

The old string has all non-English translations without format
placeholders, which will fail to build the string on those
languages until translations are added.

Bug: 384791485
Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect
Change-Id: I4565610908d463c05576d5c5d0b083f76802cc9e
parent 6d0a04a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5507,8 +5507,8 @@
    <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>
    <!-- Action for the notification to high contrast text. [CHAR LIMIT=35] -->
    <string name="accessibility_notification_high_contrast_text_action">Go to <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] -->
    <string name="accessibility_toggle_maximize_text_contrast_preference_title">Outline text</string>
    <!-- Summary for the accessibility preference to high contrast text. [CHAR LIMIT=NONE] -->
+3 −2
Original line number Diff line number Diff line
@@ -159,10 +159,11 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
            actionIntent.setAction(ACTION_OPEN_SETTINGS);
            PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0,
                    actionIntent, PendingIntent.FLAG_IMMUTABLE);
            final int actionResId =
                    R.string.accessibility_notification_high_contrast_text_action_open_settings;
            Notification.Action settingsAction = new Notification.Action.Builder(
                    /* icon= */ null,
                    context.getString(R.string.accessibility_notification_high_contrast_text_action,
                            context.getString(R.string.settings_label)),
                    context.getString(actionResId, context.getString(R.string.settings_label)),
                    actionPendingIntent
            ).build();