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

Commit 059a2f86 authored by Joe Onorato's avatar Joe Onorato
Browse files

When the number field on a notifications is >100, just say "100+" instead of listing the number.

Bug: 3271445
Change-Id: Id5704cc5cba770b918c974eeec8f9ffb3f294450
parent d434d233
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -783,8 +783,13 @@ public class Notification implements Parcelable
            if (mContentInfo != null) {
                contentView.setTextViewText(R.id.info, mContentInfo);
            } else if (mNumber > 0) {
                if (mNumber > 100) {
                    contentView.setTextViewText(R.id.info, mContext.getString(
                                R.string.status_bar_notification_info_overflow));
                } else {
                    NumberFormat f = NumberFormat.getIntegerInstance();
                    contentView.setTextViewText(R.id.info, f.format(mNumber));
                }
                contentView.setFloat(R.id.info, "setTextSize",
                        mContext.getResources().getDimensionPixelSize(
                            R.dimen.status_bar_content_number_size));
+5 −0
Original line number Diff line number Diff line
@@ -337,6 +337,11 @@
    <!-- status message in phone options dialog for when airplane mode is off -->
    <string name="global_actions_airplane_mode_off_status">Airplane mode is OFF</string>

    <!-- Text to use when the number in a notification info is too large (> 100).  Most likely does not need
    to be translated.  We do this so, for example, if the user has tens of thousands of unread
    emails, the whole notification isn't taken over by the number. [CHAR LIMIT=5] -->
    <string name="status_bar_notification_info_overflow">100+</string>

    <!-- Displayed to the user to tell them that they have started up the phone in "safe mode" -->
    <string name="safeMode">Safe mode</string>