2021-06-27 20:44:35 +00:00
|
|
|
package c.b.a.d;
|
|
|
|
|
|
|
|
import android.content.ContentResolver;
|
|
|
|
import android.graphics.Bitmap;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.os.CancellationSignal;
|
|
|
|
import c.b.a.d.j;
|
|
|
|
import c.q.a.k.a;
|
|
|
|
import d0.l;
|
|
|
|
import d0.w.g.c;
|
|
|
|
import d0.w.h.a.e;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.coroutines.Continuation;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.functions.Function2;
|
|
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
|
|
import s.a.j0;
|
|
|
|
/* compiled from: ThumbnailViewHolder.kt */
|
|
|
|
@e(c = "com.lytefast.flexinput.adapters.ThumbnailViewHolder$ThumbnailBitmapGenerator$generate$1", f = "ThumbnailViewHolder.kt", l = {103}, m = "invokeSuspend")
|
|
|
|
public final class k extends d0.w.h.a.k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
|
|
|
public final /* synthetic */ Function1 $onGenerate;
|
|
|
|
public final /* synthetic */ Uri $uri;
|
|
|
|
public Object L$0;
|
|
|
|
public int label;
|
|
|
|
public final /* synthetic */ j.b this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public k(j.b bVar, Uri uri, Function1 function1, Continuation continuation) {
|
|
|
|
super(2, continuation);
|
|
|
|
this.this$0 = bVar;
|
|
|
|
this.$uri = uri;
|
|
|
|
this.$onGenerate = function1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // d0.w.h.a.a
|
|
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
|
|
|
return new k(this.this$0, this.$uri, this.$onGenerate, continuation);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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) {
|
|
|
|
Continuation<? super Unit> continuation2 = continuation;
|
|
|
|
m.checkNotNullParameter(continuation2, "completion");
|
|
|
|
return new k(this.this$0, this.$uri, this.$onGenerate, continuation2).invokeSuspend(Unit.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // d0.w.h.a.a
|
|
|
|
public final Object invokeSuspend(Object obj) {
|
|
|
|
j.b bVar;
|
|
|
|
Object coroutine_suspended = c.getCOROUTINE_SUSPENDED();
|
|
|
|
int i = this.label;
|
|
|
|
if (i == 0) {
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
this.this$0.b = new CancellationSignal();
|
|
|
|
j.b bVar2 = this.this$0;
|
|
|
|
ContentResolver contentResolver = bVar2.d;
|
|
|
|
Uri uri = this.$uri;
|
|
|
|
this.L$0 = bVar2;
|
|
|
|
this.label = 1;
|
|
|
|
Objects.requireNonNull(bVar2);
|
2021-06-27 20:53:42 +00:00
|
|
|
Object i02 = a.i0(j0.b, new l(bVar2, contentResolver, uri, null), this);
|
|
|
|
if (i02 == coroutine_suspended) {
|
2021-06-27 20:44:35 +00:00
|
|
|
return coroutine_suspended;
|
|
|
|
}
|
|
|
|
bVar = bVar2;
|
2021-06-27 20:53:42 +00:00
|
|
|
obj = i02;
|
2021-06-27 20:44:35 +00:00
|
|
|
} else if (i == 1) {
|
|
|
|
bVar = (j.b) this.L$0;
|
|
|
|
l.throwOnFailure(obj);
|
|
|
|
} else {
|
|
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
|
|
}
|
2021-07-13 20:23:20 +00:00
|
|
|
bVar.f244c = (Bitmap) obj;
|
|
|
|
this.$onGenerate.invoke(this.this$0.f244c);
|
2021-06-27 20:44:35 +00:00
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
}
|