discord-jadx/app/src/main/java/androidx/work/CoroutineWorker$startWork$1...

69 lines
2.8 KiB
Java

package androidx.work;
import androidx.work.ListenableWorker;
import d0.l;
import d0.w.g.c;
import d0.w.h.a.e;
import d0.w.h.a.k;
import d0.z.d.m;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
/* compiled from: CoroutineWorker.kt */
@e(c = "androidx.work.CoroutineWorker$startWork$1", f = "CoroutineWorker.kt", l = {68}, m = "invokeSuspend")
public final class CoroutineWorker$startWork$1 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public Object L$0;
public int label;
private CoroutineScope p$;
public final /* synthetic */ CoroutineWorker this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public CoroutineWorker$startWork$1(CoroutineWorker coroutineWorker, Continuation continuation) {
super(2, continuation);
this.this$0 = coroutineWorker;
}
@Override // d0.w.h.a.a
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
m.checkParameterIsNotNull(continuation, "completion");
CoroutineWorker$startWork$1 coroutineWorker$startWork$1 = new CoroutineWorker$startWork$1(this.this$0, continuation);
coroutineWorker$startWork$1.p$ = (CoroutineScope) obj;
return coroutineWorker$startWork$1;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((CoroutineWorker$startWork$1) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
}
@Override // d0.w.h.a.a
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = c.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
l.throwOnFailure(obj);
CoroutineScope coroutineScope = this.p$;
CoroutineWorker coroutineWorker = this.this$0;
this.L$0 = coroutineScope;
this.label = 1;
obj = coroutineWorker.doWork(this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else if (i == 1) {
CoroutineScope coroutineScope2 = (CoroutineScope) this.L$0;
try {
l.throwOnFailure(obj);
} catch (Throwable th) {
this.this$0.getFuture$work_runtime_ktx_release().setException(th);
}
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
this.this$0.getFuture$work_runtime_ktx_release().set((ListenableWorker.Result) obj);
return Unit.a;
}
}