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

Commit f36bafc1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update redacted otp message string" into main

parents cd4097ac 8c42670c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4097,8 +4097,10 @@

    <!-- Title of the one line view of a redacted notification -->
    <string name="redacted_notification_single_line_title">Redacted</string>
    <!-- Main text of the one line view of a redacted notification -->
    <string name="redacted_notification_single_line_text">Unlock to view</string>
    <!-- Main text of the one line view of a public notification -->
    <string name="public_notification_single_line_text">Unlock to view</string>
    <!-- Main text of the one line view of a redacted OTP notification -->
    <string name="redacted_otp_notification_single_line_text">Unlock to view code</string>

    <!-- Content description for contextual education dialog [CHAR LIMIT=NONE] -->
    <string name="contextual_education_dialog_title">Contextual education</string>
+3 −3
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
                                entry.getRanking().getSummarization());
            } else {
                result.mPublicInflatedSingleLineViewModel =
                        SingleLineViewInflater.inflateRedactedSingleLineViewModel(
                        SingleLineViewInflater.inflatePublicSingleLineViewModel(
                                row.getContext(),
                                isConversation
                        );
@@ -509,7 +509,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
                new Notification.Builder(packageContext, original.getChannelId());
        redacted.setContentTitle(original.extras.getCharSequence(Notification.EXTRA_TITLE));
        CharSequence redactedMessage = systemUiContext.getString(
                R.string.redacted_notification_single_line_text
                R.string.redacted_otp_notification_single_line_text
        );
        redacted.setWhen(original.getWhen());

@@ -1362,7 +1362,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
                            );
                } else {
                    result.mPublicInflatedSingleLineViewModel =
                            SingleLineViewInflater.inflateRedactedSingleLineViewModel(
                            SingleLineViewInflater.inflatePublicSingleLineViewModel(
                                    mContext,
                                    isConversation
                            );
+2 −2
Original line number Diff line number Diff line
@@ -754,7 +754,7 @@ constructor(
                            summarization = null,
                        )
                    } else {
                        SingleLineViewInflater.inflateRedactedSingleLineViewModel(
                        SingleLineViewInflater.inflatePublicSingleLineViewModel(
                            systemUiContext,
                            entry.ranking.isConversation,
                        )
@@ -792,7 +792,7 @@ constructor(
            val redacted = Notification.Builder(packageContext, original.channelId)
            redacted.setContentTitle(original.extras.getCharSequence(Notification.EXTRA_TITLE))
            val redactedMessage =
                sysUiContext.getString(R.string.redacted_notification_single_line_text)
                sysUiContext.getString(R.string.redacted_otp_notification_single_line_text)

            if (originalStyle is MessagingStyle) {
                val newStyle = MessagingStyle(originalStyle.user)
+3 −3
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ internal object SingleLineViewInflater {
        var contentText =
            if (redactText) {
                systemUiContext.getString(
                    com.android.systemui.res.R.string.redacted_notification_single_line_text
                    com.android.systemui.res.R.string.redacted_otp_notification_single_line_text
                )
            } else {
                HybridGroupManager.resolveText(notification)
@@ -120,7 +120,7 @@ internal object SingleLineViewInflater {
    }

    @JvmStatic
    fun inflateRedactedSingleLineViewModel(
    fun inflatePublicSingleLineViewModel(
        context: Context,
        isConversation: Boolean = false,
    ): SingleLineViewModel {
@@ -144,7 +144,7 @@ internal object SingleLineViewInflater {
                com.android.systemui.res.R.string.redacted_notification_single_line_title
            ),
            context.getString(
                com.android.systemui.res.R.string.redacted_notification_single_line_text
                com.android.systemui.res.R.string.public_notification_single_line_text
            ),
            conversationData,
        )