jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335465 )

Change subject: Don't show arbitrary notifications.
......................................................................


Don't show arbitrary notifications.

(Yet.)
This restricts the notifications that the app shows to the ones that we
explicitly support.

Change-Id: Ic5c77bc1d2862a0dbc98eb8fd189b05f0a70a0a5
---
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Niedzielski: Looks good to me, approved
  jenkins-bot: Verified
  Mholloway: Looks good to me, but someone else must approve



diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java 
b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
index db381a8..b8c2d34 100644
--- a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
+++ b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
@@ -25,10 +25,10 @@
     private static final int REQUEST_CODE_AGENT = 2;
 
     public static void showNotification(@NonNull Context context, Notification 
n) {
-        @StringRes int title = R.string.notification_generic_title;
-        String description = "";
-        @DrawableRes int icon = R.mipmap.launcher;
-        @ColorInt int color = ContextCompat.getColor(context, 
R.color.foundation_gray);
+        @StringRes int title;
+        String description;
+        @DrawableRes int icon;
+        @ColorInt int color;
 
         Uri historyUri = uriForPath(n, "Special:History/"
                 + (n.isFromWikidata() ? n.title().text() : n.title().full()));
@@ -74,7 +74,7 @@
                 builder.addAction(0, 
context.getString(R.string.notification_button_view_user), agentIntent);
                 break;
             default:
-                break;
+                return;
         }
 
         builder.setContentIntent(PendingIntent.getActivity(context, 
REQUEST_CODE_PAGE, pageIntent, PendingIntent.FLAG_UPDATE_CURRENT))

-- 
To view, visit https://gerrit.wikimedia.org/r/335465
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5c77bc1d2862a0dbc98eb8fd189b05f0a70a0a5
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to