From 0bd9fc8abcbccd66c6a186f60b52742d246d8593 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Mon, 16 Jul 2018 14:28:48 +0200 Subject: [PATCH] Fix an issue with duplicate calls Signed-off-by: Mario Danic --- app/gplay.gradle | 8 ++------ .../services/firebase/MagicFirebaseMessagingService.java | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/gplay.gradle b/app/gplay.gradle index 4384237eb..c1766ff04 100644 --- a/app/gplay.gradle +++ b/app/gplay.gradle @@ -1,8 +1,4 @@ -ext { - googleLibraryVersion = '9.6.1' -} - dependencies { - implementation "com.google.android.gms:play-services-gcm:${googleLibraryVersion}" - implementation "com.google.firebase:firebase-messaging:${googleLibraryVersion}" + implementation "com.google.android.gms:play-services-gcm:15.0.1" + implementation "com.google.firebase:firebase-messaging:17.1.0" } diff --git a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java index b36192339..554c56192 100644 --- a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java +++ b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.java @@ -34,6 +34,10 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService { @SuppressLint("LongLogTag") @Override public void onMessageReceived(RemoteMessage remoteMessage) { + if (remoteMessage == null) { + return; + } + if (remoteMessage.getData() != null) { PersistableBundleCompat persistableBundleCompat = new PersistableBundleCompat(); persistableBundleCompat.putString(BundleKeys.KEY_NOTIFICATION_SUBJECT, remoteMessage.getData().get