Skip to content

Commit

Permalink
Removed DisposableObserver wrapping in LocationServicesOkObservable (#…
Browse files Browse the repository at this point in the history
…574)

Seems unnecessary
  • Loading branch information
dariuszseweryn authored May 17, 2019
1 parent 9d7f60f commit b413667
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@

import com.polidea.rxandroidble2.ClientComponent;
import com.polidea.rxandroidble2.DaggerClientComponent;
import com.polidea.rxandroidble2.internal.util.DisposableUtil;

import java.util.UUID;

import bleshadow.javax.inject.Inject;
import bleshadow.javax.inject.Named;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.observers.DisposableObserver;

/**
* An Observable that emits false if an attempt to scan with {@link com.polidea.rxandroidble2.RxBleClient#scanBleDevices(UUID...)}
Expand Down Expand Up @@ -43,8 +41,6 @@ public static LocationServicesOkObservable createInstance(@NonNull final Context

@Override
protected void subscribeActual(final Observer<? super Boolean> observer) {
final DisposableObserver<? super Boolean> disposableObserver = DisposableUtil.disposableObserver(observer);
observer.onSubscribe(disposableObserver);
locationServicesOkObsImpl.subscribeWith(disposableObserver);
locationServicesOkObsImpl.subscribe(observer);
}
}

0 comments on commit b413667

Please sign in to comment.