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

Commit a46302a1 authored by Jackal Guo's avatar Jackal Guo
Browse files

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

Test: manual - show the snooze menu, expand to see options
Test: NotificationSnoozeTest
Change-Id: I7a13ffdd937e543662460f25e0a7a092e6fe5be6
Fix: 71417718
parent 25047140
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);
    }