Added null checks to GCM service.

This commit is contained in:
harshanl 2015-12-23 15:30:42 +05:30
parent 935bafaefe
commit 618cd1b8fd

View File

@ -123,7 +123,7 @@ public class GCMUtil {
//Set device reg-ids //Set device reg-ids
JsonArray regIds = new JsonArray(); JsonArray regIds = new JsonArray();
for (String regId : registrationIds) { for (String regId : registrationIds) {
if (regId == null && regId.isEmpty()) { if (regId == null || regId.isEmpty()) {
continue; continue;
} }
regIds.add(new JsonPrimitive(regId)); regIds.add(new JsonPrimitive(regId));