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

Commit 4f0f5e85 authored by Jackal Guo's avatar Jackal Guo Committed by Android (Google) Code Review
Browse files

Merge "Update the format for hours and minutes in the snooze menu."

parents 7209b172 a46302a1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -256,10 +256,14 @@ public class NotificationSnooze extends LinearLayout
        int count = showInHours ? (minutes / 60) : minutes;
        String description = res.getQuantityString(pluralResId, count, count);
        String resultText = String.format(res.getString(R.string.snoozed_for_time), description);
        AccessibilityAction action = new AccessibilityAction(accessibilityActionId, description);
        final int index = resultText.indexOf(description);
        if (index == -1) {
            return new NotificationSnoozeOption(null, minutes, description, resultText, action);
        }
        SpannableString string = new SpannableString(resultText);
        string.setSpan(new StyleSpan(Typeface.BOLD),
                resultText.length() - description.length(), resultText.length(), 0 /* flags */);
        AccessibilityAction action = new AccessibilityAction(accessibilityActionId, description);
                index, index + description.length(), 0 /* flags */);
        return new NotificationSnoozeOption(null, minutes, description, string,
                action);
    }