Skip to content

Commit f78e75f

Browse files
author
Victor
committed
refactor handling error subscription with Actions.empty()
1 parent 76670e5 commit f78e75f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rx_gcm/src/main/java/rx_gcm/internal/RxGcm.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import rx.Subscriber;
2828
import rx.android.schedulers.AndroidSchedulers;
2929
import rx.functions.Action1;
30+
import rx.functions.Actions;
3031
import rx.schedulers.Schedulers;
3132
import rx_gcm.GcmReceiverData;
3233
import rx_gcm.GcmReceiverUIBackground;
@@ -185,9 +186,7 @@ void onNotificationReceived(String from, Bundle payload) {
185186
}
186187
}
187188
})
188-
.subscribe(new Action1<Message>() {
189-
@Override public void call(Message message) {}
190-
}, new Action1<Throwable>() {
189+
.subscribe(Actions.empty(), new Action1<Throwable>() {
191190
@Override public void call(Throwable throwable) {
192191
String message = "Error thrown from GcmReceiverData subscription. Cause exception: " + throwable.getMessage();
193192
Log.e("RxGcm", message);

0 commit comments

Comments
 (0)