Bug 1313363 - NotificationClient: Use BigTextStyle instead of InboxStyle. r=Grisha
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 28 Oct 2016 17:18:52 +0200
changeset 320213 e16379c75b3d485512ae58a8c8988cd68fd0b82a
parent 320212 fc6a63bedaec6e34bb3b2491b497b4f131387dab
child 320214 655b506d7bfa0cfef1c5aba195a2903e7faf95fb
push id20754
push usercbook@mozilla.com
push dateMon, 31 Oct 2016 15:58:35 +0000
treeherderfx-team@b1b66b1780c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGrisha
bugs1313363
milestone52.0a1
Bug 1313363 - NotificationClient: Use BigTextStyle instead of InboxStyle. r=Grisha There's no reason to use InboxStyle here. We do not add any items to the list. Currently the content text is truncated aggressively showing only one line of text. With BigTextStyle we can show a lot more. MozReview-Commit-ID: 8CQZVHzc7b8
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
--- a/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
@@ -142,19 +142,19 @@ public final class NotificationClient im
                      final PendingIntent contentIntent, final PendingIntent deleteIntent) {
         final NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
                 .setContentTitle(alertTitle)
                 .setContentText(alertText)
                 .setSmallIcon(R.drawable.ic_status_logo)
                 .setContentIntent(contentIntent)
                 .setDeleteIntent(deleteIntent)
                 .setAutoCancel(true)
-                .setStyle(new NotificationCompat.InboxStyle()
-                          .addLine(alertText)
-                          .setSummaryText(host));
+                .setStyle(new NotificationCompat.BigTextStyle()
+                        .bigText(alertText)
+                        .setSummaryText(host));
 
         // Fetch icon.
         if (!imageUrl.isEmpty()) {
             final Bitmap image = BitmapUtils.decodeUrl(imageUrl);
             builder.setLargeIcon(image);
         }
 
         builder.setWhen(System.currentTimeMillis());