diff --git a/autodispose-rxlifecycle/src/main/java/com/ubercab/autodispose/rxlifecycle/RxLifecycleInterop.java b/autodispose-rxlifecycle/src/main/java/com/ubercab/autodispose/rxlifecycle/RxLifecycleInterop.java index 7190c9cd8..9a5046c0c 100644 --- a/autodispose-rxlifecycle/src/main/java/com/ubercab/autodispose/rxlifecycle/RxLifecycleInterop.java +++ b/autodispose-rxlifecycle/src/main/java/com/ubercab/autodispose/rxlifecycle/RxLifecycleInterop.java @@ -2,6 +2,7 @@ import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.OutsideLifecycleException; +import com.uber.autodispose.AutoDispose.ScopeHandler; import com.uber.autodispose.LifecycleEndedException; import com.uber.autodispose.ScopeProvider; import io.reactivex.Maybe; @@ -28,6 +29,21 @@ private RxLifecycleInterop() { private static final Object DEFAULT_THROWAWAY_OBJECT = new Object(); + /** + * Converter for transforming {@link LifecycleProvider} to {@link ScopeProvider}. + * It disposes the source when the next reasonable event occurs. + *
+ * Example usage: + *
+ * Observable.just(1)
+ * .to(RxLifecycleInterop.from(lifecycleProvider))
+ * .subscribe(...)
+ *
+ *
+ * @param + * Example usage: + *
+ * Observable.just(1)
+ * .to(RxLifecycleInterop.from(lifecycleProvider, event))
+ * .subscribe(...)
+ *
+ *
+ * @param