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 346904 e16379c75b3d485512ae58a8c8988cd68fd0b82a
parent 346903 fc6a63bedaec6e34bb3b2491b497b4f131387dab
child 346905 655b506d7bfa0cfef1c5aba195a2903e7faf95fb
child 346966 74b268465bc724c303f44de6fd3bb939c56f52de
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [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());