src/main/java/io/reactivex/disposables/Disposables.java
@NonNull
    public static Disposable fromSubscription(@NonNull Subscription subscription) {
        ObjectHelper.requireNonNull(subscription, "subscription is null");
        return new SubscriptionDisposable(subscription);
    }
@NonNull
    public static Disposable fromSubscription(@NonNull Subscription subscription) {
        ObjectHelper.requireNonNull(subscription, "subscription is null");
        return new SubscriptionDisposable(subscription);
    }
@ NonNull public static Disposable fromSubscription ( @ NonNull Subscription subscription ) { ObjectHelper . requireNonNull ( subscription , "subscription is null" ) ; return new SubscriptionDisposable ( subscription ) ; }
Construct a Disposable by wrapping a Subscription that is
cancelled exactly once when the Disposable is disposed.
@param subscription the Runnable to wrap
@return the new Disposable instance
Construct a Disposable by wrapping a Subscription that is cancelled exactly once when the Disposable is disposed .