Merge "Revise string and change asset" into sc-dev

This commit is contained in:
Ryan Lin
2021-03-25 01:41:54 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 9 deletions

View File

@@ -5918,9 +5918,9 @@ ul.</string>
<!-- Window magnification prompt related string. -->
<!-- Notification title to prompt the user that new magnification feature is available. [CHAR LIMIT=50] -->
<string name="window_magnification_prompt_title">Magnify part of your screen</string>
<string name="window_magnification_prompt_title">New magnification settings</string>
<!-- Notification content to prompt the user that new magnification feature is available. [CHAR LIMIT=NONE] -->
<string name="window_magnification_prompt_content">You can now magnify your full screen, a specific area, or switch between both options.</string>
<string name="window_magnification_prompt_content">You can now magnify part of your screen.</string>
<!-- Notification action to bring the user to magnification settings page. [CHAR LIMIT=50] -->
<string name="turn_on_magnification_settings_action">Turn on in Settings</string>
<!-- Notification action to dismiss. [CHAR LIMIT=50] -->

View File

@@ -108,7 +108,7 @@ public class WindowMagnificationPromptController {
SystemNotificationChannels.ACCESSIBILITY_MAGNIFICATION);
final String message = mContext.getString(R.string.window_magnification_prompt_content);
notificationBuilder.setSmallIcon(R.drawable.ic_settings_24dp)
notificationBuilder.setSmallIcon(R.drawable.ic_accessibility_24dp)
.setContentTitle(mContext.getString(R.string.window_magnification_prompt_title))
.setContentText(message)
.setLargeIcon(Icon.createWithResource(mContext,
@@ -118,7 +118,7 @@ public class WindowMagnificationPromptController {
.setStyle(new Notification.BigTextStyle().bigText(message))
.setDeleteIntent(createPendingIntent(ACTION_DISMISS))
.setContentIntent(createPendingIntent(ACTION_TURN_ON_IN_SETTINGS))
.setActions(buildTurnOnAction(), buildDismissAction());
.setActions(buildTurnOnAction());
mNotificationManager.notify(NOTE_A11Y_WINDOW_MAGNIFICATION_FEATURE,
notificationBuilder.build());
registerReceiverIfNeeded();
@@ -145,11 +145,6 @@ public class WindowMagnificationPromptController {
createPendingIntent(ACTION_TURN_ON_IN_SETTINGS)).build();
}
private Notification.Action buildDismissAction() {
return new Notification.Action.Builder(null, mContext.getString(R.string.dismiss_action),
createPendingIntent(ACTION_DISMISS)).build();
}
private PendingIntent createPendingIntent(String action) {
final Intent intent = new Intent(action);
intent.setPackage(mContext.getPackageName());