Skip to content

Commit 0e71f10

Browse files
committed
Merge pull request #216 from ParsePlatform/wangmengyan.remove_unnecessary_installation_save
Do not save installation when we only set pushType
2 parents a221bb2 + ebef656 commit 0e71f10

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Parse/src/main/java/com/parse/GcmRegistrar.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,13 @@ public Task<Void> then(Task<Boolean> task) throws Exception {
105105
if (!task.getResult()) {
106106
return Task.forResult(null);
107107
}
108-
Task<Void> saveTask;
109108
if (installation.getPushType() != PushType.GCM) {
110109
installation.setPushType(PushType.GCM);
111-
saveTask = installation.saveInBackground();
112-
} else {
113-
saveTask = Task.forResult(null);
114110
}
115111
// We do not need to wait sendRegistrationRequestAsync, since this task will finish
116112
// after we get the response from GCM, if we wait for this task, it will block our test.
117113
sendRegistrationRequestAsync();
118-
return saveTask;
114+
return Task.forResult(null);
119115
}
120116
});
121117
}

0 commit comments

Comments
 (0)