diff options
author | d34d <clark@cyngn.com> | 2017-02-13 01:12:57 -0500 |
---|---|---|
committer | Dan Pasanen <dan.pasanen@gmail.com> | 2017-02-14 17:20:34 +0000 |
commit | f7d5700e53311c01f63b5e37268962acbb61e10b (patch) | |
tree | 07c0d6315eb51243e20da0824a1cf4991e193e8e | |
parent | bc2bc4b4de978f43541f4b08c24583465b3e93dc (diff) | |
download | android_frameworks_base-staging/cm-14.1-cafrebase.tar.gz android_frameworks_base-staging/cm-14.1-cafrebase.tar.bz2 android_frameworks_base-staging/cm-14.1-cafrebase.zip |
Show infinity for large notification countsstaging/cm-14.1-cafrebase
This patch adds a new string to SystemUI for displaying the infinity
symbol when a notification has a count larger than 999. This only
affects the notification icon in the status bar and does not change
the text displayed in the actual notification.
These changes were manually cherry-picked from cm-13.0.
Change-Id: I3481aac13cd90ee20ed48194df3ec789c16c8b4b
-rw-r--r-- | packages/SystemUI/res/values/cm_strings.xml | 6 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml index 966c8e62733..24df2011985 100644 --- a/packages/SystemUI/res/values/cm_strings.xml +++ b/packages/SystemUI/res/values/cm_strings.xml @@ -132,4 +132,10 @@ <!-- Content description of the data connection type HSPA+ for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_data_connection_hspap">HSPA+</string> + + <!-- Text to use when the number in a notification info is too large + (greater than status_bar_notification_info_maxnum, defined in + values/config.xml) and must be truncated. + [CHAR LIMIT=4] --> + <string name="status_bar_notification_info_overflow" translatable="false">\u221E</string> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java index c4b191419e5..c9817e5f928 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java @@ -321,7 +321,7 @@ public class StatusBarIconView extends AnimatedImageView { android.R.integer.status_bar_notification_info_maxnum); if (mIcon.number > tooBig) { str = getContext().getResources().getString( - android.R.string.status_bar_notification_info_overflow); + R.string.status_bar_notification_info_overflow); } else { NumberFormat f = NumberFormat.getIntegerInstance(); str = f.format(mIcon.number); |