From 60b2eaec259537f8202d8725ddafefdb5ebac886 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Mon, 18 Apr 2016 10:29:52 +0200 Subject: [PATCH] Add support for collapse_key related to #104 --- extern/GmsApi | 2 +- .../src/main/java/org/microg/gms/gcm/McsService.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/GmsApi b/extern/GmsApi index 6aa11065..5e58a66a 160000 --- a/extern/GmsApi +++ b/extern/GmsApi @@ -1 +1 @@ -Subproject commit 6aa110657beec0b3e6c26d1030943e0b97683335 +Subproject commit 5e58a66a1eab3c9f01de60bfd937a09225ef5648 diff --git a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java index 3267a8a2..f43b8891 100644 --- a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java +++ b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java @@ -56,6 +56,7 @@ import javax.net.ssl.SSLContext; import static android.os.Build.VERSION.SDK_INT; import static org.microg.gms.gcm.GcmConstants.ACTION_C2DM_RECEIVE; +import static org.microg.gms.gcm.GcmConstants.EXTRA_COLLAPSE_KEY; import static org.microg.gms.gcm.GcmConstants.EXTRA_FROM; import static org.microg.gms.gcm.GcmConstants.EXTRA_MESSAGE_TYPE; import static org.microg.gms.gcm.GcmConstants.MESSAGE_TYPE_GCM; @@ -307,6 +308,7 @@ public class McsService extends Service implements Handler.Callback { intent.setPackage(msg.category); intent.putExtra(EXTRA_MESSAGE_TYPE, MESSAGE_TYPE_GCM); intent.putExtra(EXTRA_FROM, msg.from); + if (msg.token != null) intent.putExtra(EXTRA_COLLAPSE_KEY, msg.token); for (AppData appData : msg.app_data) { intent.putExtra(appData.key, appData.value); }