Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Parse/src/main/java/com/parse/GcmRegistrar.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,13 @@ public Task<Void> then(Task<Boolean> task) throws Exception {
if (!task.getResult()) {
return Task.forResult(null);
}
Task<Void> saveTask;
if (installation.getPushType() != PushType.GCM) {
installation.setPushType(PushType.GCM);
saveTask = installation.saveInBackground();
} else {
saveTask = Task.forResult(null);
}
// We do not need to wait sendRegistrationRequestAsync, since this task will finish
// after we get the response from GCM, if we wait for this task, it will block our test.
sendRegistrationRequestAsync();
return saveTask;
return Task.forResult(null);
}
});
}
Expand Down