Add support for collapse_key

related to #104
This commit is contained in:
Marvin W 2016-04-18 10:29:52 +02:00
parent 2a394f98aa
commit 60b2eaec25
2 changed files with 3 additions and 1 deletions

2
extern/GmsApi vendored

@ -1 +1 @@
Subproject commit 6aa110657beec0b3e6c26d1030943e0b97683335
Subproject commit 5e58a66a1eab3c9f01de60bfd937a09225ef5648

View File

@ -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);
}