package io.reactivex; import io.reactivex.annotations.CheckReturnValue; import io.reactivex.annotations.NonNull; import io.reactivex.annotations.SchedulerSupport; import io.reactivex.d.a; import io.reactivex.internal.d.h; import io.reactivex.internal.e.a.c; import io.reactivex.internal.e.a.d; import io.reactivex.internal.e.a.e; import java.util.concurrent.Callable; /* compiled from: Completable */ public abstract class b implements d { /* access modifiers changed from: protected */ public abstract void b(c cVar); @SchedulerSupport @CheckReturnValue @NonNull public static b a(a aVar) { io.reactivex.internal.b.b.a((Object) aVar, "run is null"); return io.reactivex.f.a.a(new io.reactivex.internal.e.a.a(aVar)); } @SchedulerSupport @CheckReturnValue @NonNull public static b a(Callable<?> callable) { io.reactivex.internal.b.b.a((Object) callable, "callable is null"); return io.reactivex.f.a.a(new io.reactivex.internal.e.a.b(callable)); } private static NullPointerException a(Throwable th) { NullPointerException nullPointerException = new NullPointerException("Actually not, but can't pass out an exception otherwise..."); nullPointerException.initCause(th); return nullPointerException; } @SchedulerSupport @CheckReturnValue @NonNull public static b a(d dVar) { io.reactivex.internal.b.b.a((Object) dVar, "source is null"); if (dVar instanceof b) { return io.reactivex.f.a.a((b) dVar); } return io.reactivex.f.a.a(new c(dVar)); } @SchedulerSupport @CheckReturnValue public final b a(e eVar) { return a(((e) io.reactivex.internal.b.b.a((Object) eVar, "transformer is null")).a(this)); } @SchedulerSupport @CheckReturnValue @NonNull public final b a(r rVar) { io.reactivex.internal.b.b.a((Object) rVar, "scheduler is null"); return io.reactivex.f.a.a(new d(this, rVar)); } @SchedulerSupport public final io.reactivex.b.c a() { h hVar = new h(); a(hVar); return hVar; } @Override // io.reactivex.d @SchedulerSupport public final void a(c cVar) { io.reactivex.internal.b.b.a((Object) cVar, "observer is null"); try { c a2 = io.reactivex.f.a.a(this, cVar); io.reactivex.internal.b.b.a((Object) a2, "The RxJavaPlugins.onSubscribe hook returned a null CompletableObserver. Please check the handler provided to RxJavaPlugins.setOnCompletableSubscribe for invalid null returns. Further reading: https://github.com/ReactiveX/RxJava/wiki/Plugins"); b(a2); } catch (NullPointerException e) { throw e; } catch (Throwable th) { io.reactivex.c.b.b(th); io.reactivex.f.a.a(th); throw a(th); } } @SchedulerSupport @CheckReturnValue @NonNull public final io.reactivex.b.c a(a aVar, io.reactivex.d.d<? super Throwable> dVar) { io.reactivex.internal.b.b.a((Object) dVar, "onError is null"); io.reactivex.internal.b.b.a((Object) aVar, "onComplete is null"); io.reactivex.internal.d.d dVar2 = new io.reactivex.internal.d.d(dVar, aVar); a(dVar2); return dVar2; } @SchedulerSupport @CheckReturnValue @NonNull public final b b(r rVar) { io.reactivex.internal.b.b.a((Object) rVar, "scheduler is null"); return io.reactivex.f.a.a(new e(this, rVar)); } }