Back to project page android-sdk.
The source code is released under:
MIT License
If you think the Android project android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.relayr.util; /*from www . j a v a 2 s . com*/ import javax.inject.Inject; import io.relayr.api.StatusApi; import rx.Observable; import rx.Subscriber; public class MockReachabilityUtils extends ReachabilityUtils { @Inject MockReachabilityUtils(StatusApi api) { super(api); } @Override public Observable<Boolean> isPlatformReachable() { return Observable.create(new Observable.OnSubscribe<Boolean>() { @Override public void call(Subscriber<? super Boolean> sub) { sub.onNext(true); } }); } @Override public boolean isConnectedToInternet() { return true; } @Override public boolean isPermissionGranted(String permission) { return true; } }