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

Commit 7d4f2200 authored by Ryan Lin's avatar Ryan Lin Committed by Automerger Merge Worker
Browse files

Merge "Revise string and change asset" into sc-dev am: 215741a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13981607

Change-Id: Id995eb9656924b8fca6166adac03a3db272bd0be
parents 04cd6994 215741a5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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] -->
+2 −7
Original line number Diff line number Diff line
@@ -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());