50 lines
1.6 KiB
Java
50 lines
1.6 KiB
Java
package androidx.lifecycle;
|
|
|
|
import androidx.annotation.MainThread;
|
|
import c.q.a.k.a;
|
|
import d0.w.g.c;
|
|
import d0.z.d.m;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.Continuation;
|
|
import s.a.j0;
|
|
import s.a.k0;
|
|
import s.a.z;
|
|
/* compiled from: CoroutineLiveData.kt */
|
|
public final class EmittedSource implements k0 {
|
|
private boolean disposed;
|
|
private final MediatorLiveData<?> mediator;
|
|
private final LiveData<?> source;
|
|
|
|
public EmittedSource(LiveData<?> liveData, MediatorLiveData<?> mediatorLiveData) {
|
|
m.checkNotNullParameter(liveData, "source");
|
|
m.checkNotNullParameter(mediatorLiveData, "mediator");
|
|
this.source = liveData;
|
|
this.mediator = mediatorLiveData;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$removeSource(EmittedSource emittedSource) {
|
|
emittedSource.removeSource();
|
|
}
|
|
|
|
/* JADX DEBUG: Type inference failed for r1v0. Raw type applied. Possible types: androidx.lifecycle.LiveData<?>, androidx.lifecycle.LiveData<S> */
|
|
@MainThread
|
|
private final void removeSource() {
|
|
if (!this.disposed) {
|
|
this.mediator.removeSource(this.source);
|
|
this.disposed = true;
|
|
}
|
|
}
|
|
|
|
@Override // s.a.k0
|
|
public void dispose() {
|
|
z zVar = j0.a;
|
|
a.F(a.a(s.a.a.m.b.H()), null, null, new EmittedSource$dispose$1(this, null), 3, null);
|
|
}
|
|
|
|
public final Object disposeNow(Continuation<? super Unit> continuation) {
|
|
z zVar = j0.a;
|
|
Object h02 = a.h0(s.a.a.m.b.H(), new EmittedSource$disposeNow$2(this, null), continuation);
|
|
return h02 == c.getCOROUTINE_SUSPENDED() ? h02 : Unit.a;
|
|
}
|
|
}
|