Skip to content

Commit febe37d

Browse files
committed
fixup! Added LifecycleObserver and tests
1 parent 8b7c07b commit febe37d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rxandroid/src/main/java/rx/android/lifecycle/LifecycleObservable.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ private LifecycleObservable() {
2727
/**
2828
* Binds the given source to a lifecycle.
2929
* <p/>
30-
* When the lifecycle event occurs, the source will cease to receive any notifications.
30+
* When the lifecycle event occurs, the source will cease to emit any notifications.
3131
*
3232
* @param lifecycle the lifecycle sequence
3333
* @param source the source sequence
34-
* @param event the event which should conclude notifications to the source
34+
* @param event the event which should conclude notifications from the source
3535
*/
3636
public static <T> Observable<T> bindUntilLifecycleEvent(Observable<LifecycleEvent> lifecycle,
3737
Observable<T> source,
@@ -55,8 +55,8 @@ public Boolean call(LifecycleEvent lifecycleEvent) {
5555
/**
5656
* Binds the given source to an Activity lifecycle.
5757
* <p/>
58-
* This helper automatically determines (based on the lifecycle sequence itself) when it should
59-
* stop sending notifications to the source. In the case that the lifecycle sequence is in the
58+
* This helper automatically determines (based on the lifecycle sequence itself) when the source
59+
* should stop emitting items. In the case that the lifecycle sequence is in the
6060
* creation phase (CREATE, START, etc) it will choose the equivalent destructive phase (DESTROY,
6161
* STOP, etc). If used in the destructive phase, the notifications will cease at the next event;
6262
* for example, if used in PAUSE, it will unsubscribe in STOP.
@@ -74,8 +74,8 @@ public static <T> Observable<T> bindActivityLifecycle(Observable<LifecycleEvent>
7474
/**
7575
* Binds the given source to a Fragment lifecycle.
7676
* <p/>
77-
* This helper automatically determines (based on the lifecycle sequence itself) when it should
78-
* stop sending notifications to the source. In the case that the lifecycle sequence is in the
77+
* This helper automatically determines (based on the lifecycle sequence itself) when the source
78+
* should stop emitting items. In the case that the lifecycle sequence is in the
7979
* creation phase (CREATE, START, etc) it will choose the equivalent destructive phase (DESTROY,
8080
* STOP, etc). If used in the destructive phase, the notifications will cease at the next event;
8181
* for example, if used in PAUSE, it will unsubscribe in STOP.
@@ -108,7 +108,7 @@ private static <T> Observable<T> bindLifecycle(Observable<LifecycleEvent> lifecy
108108
sharedLifecycle.skip(1),
109109
new Func2<LifecycleEvent, LifecycleEvent, Boolean>() {
110110
@Override
111-
public Boolean call(LifecycleEvent lifecycleEvent, LifecycleEvent bindUntilEvent) {
111+
public Boolean call(LifecycleEvent bindUntilEvent, LifecycleEvent lifecycleEvent) {
112112
return lifecycleEvent == bindUntilEvent;
113113
}
114114
})

0 commit comments

Comments
 (0)