diff --git a/rxlifecycle/src/main/java/com/trello/rxlifecycle/RxLifecycle.java b/rxlifecycle/src/main/java/com/trello/rxlifecycle/RxLifecycle.java index 5f409e3..b3d565d 100644 --- a/rxlifecycle/src/main/java/com/trello/rxlifecycle/RxLifecycle.java +++ b/rxlifecycle/src/main/java/com/trello/rxlifecycle/RxLifecycle.java @@ -83,7 +83,7 @@ public Observable call(Observable source) { lifecycle.takeFirst(new Func1() { @Override public Boolean call(R lifecycleEvent) { - return lifecycleEvent == event; + return lifecycleEvent.equals(event); } }) ); @@ -231,7 +231,7 @@ public Observable call(Observable source) { new Func2() { @Override public Boolean call(R bindUntilEvent, R lifecycleEvent) { - return lifecycleEvent == bindUntilEvent; + return lifecycleEvent.equals(bindUntilEvent); } }) .onErrorReturn(RESUME_FUNCTION)