Merge "fix(high contrast text): Uses a new string resource for the settings action." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
b5299b17d9
@@ -5511,8 +5511,8 @@
|
|||||||
<string name="accessibility_notification_high_contrast_text_title">Improve text contrast</string>
|
<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] -->
|
<!-- 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>
|
<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] -->
|
<!-- Action for the notification to high contrast text to open the Settings app. [CHAR LIMIT=35] -->
|
||||||
<string name="accessibility_notification_high_contrast_text_action">Go to <xliff:g example="Settings" id="settings">%1$s</xliff:g></string>
|
<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] -->
|
<!-- 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>
|
<string name="accessibility_toggle_maximize_text_contrast_preference_title">Outline text</string>
|
||||||
<!-- Summary for the accessibility preference to high contrast text. [CHAR LIMIT=NONE] -->
|
<!-- Summary for the accessibility preference to high contrast text. [CHAR LIMIT=NONE] -->
|
||||||
|
@@ -163,10 +163,11 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
|
|||||||
actionIntent.setAction(ACTION_OPEN_SETTINGS);
|
actionIntent.setAction(ACTION_OPEN_SETTINGS);
|
||||||
PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0,
|
PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0,
|
||||||
actionIntent, PendingIntent.FLAG_IMMUTABLE);
|
actionIntent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
final int actionResId =
|
||||||
|
R.string.accessibility_notification_high_contrast_text_action_open_settings;
|
||||||
Notification.Action settingsAction = new Notification.Action.Builder(
|
Notification.Action settingsAction = new Notification.Action.Builder(
|
||||||
/* icon= */ null,
|
/* icon= */ null,
|
||||||
context.getString(R.string.accessibility_notification_high_contrast_text_action,
|
context.getString(actionResId, context.getString(R.string.settings_label)),
|
||||||
context.getString(R.string.settings_label)),
|
|
||||||
actionPendingIntent
|
actionPendingIntent
|
||||||
).build();
|
).build();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user