Bug 1482478 - Treat handler attribute in notification message as optional. r=jchen
authorJan Henning <jh+bugzilla@buttercookie.de>
Tue, 14 Aug 2018 21:25:03 +0000
changeset 431615 8cfb5c70e0ed8e88bde99a0408397e1eebcdd5f0
parent 431614 9d21ea9afe7a61cfe80d577809bf3191e816baec
child 431616 3208575a228a9f2228c0efb0d2a453894f10860e
push id106499
push usernbeleuzu@mozilla.com
push dateWed, 15 Aug 2018 09:57:40 +0000
treeherdermozilla-inbound@4609d0b65d7c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1482478
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482478 - Treat handler attribute in notification message as optional. r=jchen Differential Revision: https://phabricator.services.mozilla.com/D3359
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
--- a/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
@@ -362,17 +362,17 @@ public final class NotificationHelper im
 
         if (message.containsKey(LARGE_ICON_ATTR)) {
             final Bitmap b = BitmapUtils.getBitmapFromDataURI(
                     message.getString(LARGE_ICON_ATTR, ""));
             builder.setLargeIcon(b);
         }
 
         if (!AppConstants.Versions.preO) {
-            if (message.getString(HANDLER_ATTR).equals("downloads")) {
+            if ("downloads".equals(message.getString(HANDLER_ATTR))) {
                 builder.setChannelId(getNotificationChannel(Channel.DOWNLOAD).getId());
                 builder.setOnlyAlertOnce(true);
             } else {
                 builder.setChannelId(getNotificationChannel(Channel.DEFAULT).getId());
             }
         }
 
         if (message.containsKey(PROGRESS_VALUE_ATTR) &&