discord-jadx/app/src/main/java/androidx/lifecycle/EmittedSource.java

51 lines
1.6 KiB
Java
Raw Normal View History

2021-07-24 02:37:17 +00:00
package androidx.lifecycle;
import androidx.annotation.MainThread;
2021-12-17 21:59:34 +00:00
import b.i.a.f.e.o.f;
2021-11-02 06:38:17 +00:00
import d0.w.h.c;
import d0.z.d.m;
2021-07-24 02:37:17 +00:00
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.CoroutineDispatcher;
2021-11-02 06:38:17 +00:00
import s.a.a.n;
2021-12-02 18:53:44 +00:00
import s.a.k0;
import s.a.m0;
2021-07-24 02:37:17 +00:00
/* compiled from: CoroutineLiveData.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes.dex */
2021-12-02 18:53:44 +00:00
public final class EmittedSource implements m0 {
2021-07-24 02:37:17 +00:00
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();
}
@MainThread
private final void removeSource() {
if (!this.disposed) {
this.mediator.removeSource(this.source);
this.disposed = true;
}
}
2021-12-02 18:53:44 +00:00
@Override // s.a.m0
2021-07-24 02:37:17 +00:00
public void dispose() {
2021-12-02 18:53:44 +00:00
CoroutineDispatcher coroutineDispatcher = k0.a;
2022-04-04 09:20:14 +00:00
f.H0(f.c(n.f3824b.H()), null, null, new EmittedSource$dispose$1(this, null), 3, null);
2021-07-24 02:37:17 +00:00
}
public final Object disposeNow(Continuation<? super Unit> continuation) {
2021-12-02 18:53:44 +00:00
CoroutineDispatcher coroutineDispatcher = k0.a;
2022-04-04 09:20:14 +00:00
Object C1 = f.C1(n.f3824b.H(), new EmittedSource$disposeNow$2(this, null), continuation);
2022-01-13 08:07:50 +00:00
return C1 == c.getCOROUTINE_SUSPENDED() ? C1 : Unit.a;
2021-07-24 02:37:17 +00:00
}
}