Merge "Clicking on CID link causes webview corruption" into ub-gmail-ur14-dev
diff --git a/src/com/android/mail/utils/NotificationUtils.java b/src/com/android/mail/utils/NotificationUtils.java
index 58bf0ac..d470a29 100644
--- a/src/com/android/mail/utils/NotificationUtils.java
+++ b/src/com/android/mail/utils/NotificationUtils.java
@@ -96,6 +96,7 @@
     public static final String EXTRA_UNSEEN_COUNT = "unseen-count";
     public static final String EXTRA_GET_ATTENTION = "get-attention";
     private static final int PUBLIC_NOTIFICATIONS_VISIBLE_CHARS = 4;
+    private static final int MAX_CHARS = 5120;
 
     /** Contains a list of <(account, label), unread conversations> */
     private static NotificationMap sActiveNotificationMap = null;
@@ -1504,7 +1505,10 @@
         final TextAppearanceSpan notificationSubjectSpan = new TextAppearanceSpan(
                 context, R.style.NotificationPrimaryText);
 
-        final String snippet = getMessageBodyWithoutElidedText(message);
+        String snippet = getMessageBodyWithoutElidedText(message);
+        if (snippet.length() > MAX_CHARS) {
+            snippet = snippet.substring(0,  MAX_CHARS);
+        }
 
         // Change multiple newlines (with potential white space between), into a single new line
         final String collapsedSnippet =