Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 InstagramPhotosServiceImpl$loadPhotos$1.java 源代码,内容仅作参考
package com.picsart.chooser.media.albums.media.service;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.picsart.logger.PALog;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
import java.util.Scanner;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.EmptyList;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import myobfuscated.az1.a;
import myobfuscated.o20.d0;
import myobfuscated.o20.i;
import myobfuscated.ot.h;
import myobfuscated.q50.q;
import myobfuscated.sn2.f;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003*\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00020\u00010\u0000H\u008a@"}, d2 = {"Lmyobfuscated/sn2/f;", "Lmyobfuscated/o20/i;", "Lmyobfuscated/o20/d0;", "", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@myobfuscated.ok2.d(c = "com.picsart.chooser.media.albums.media.service.InstagramPhotosServiceImpl$loadPhotos$1", f = "InstagramPhotosServiceImpl.kt", l = {44}, m = "invokeSuspend")
final class InstagramPhotosServiceImpl$loadPhotos$1 extends SuspendLambda implements Function2<f<? super i<? extends d0>>, myobfuscated.mk2.c<? super Unit>, Object> {
final q $params;
private Object L$0;
int label;
final b this$0;
public InstagramPhotosServiceImpl$loadPhotos$1(b bVar, q qVar, myobfuscated.mk2.c<? super InstagramPhotosServiceImpl$loadPhotos$1> cVar) {
super(2, cVar);
this.this$0 = bVar;
this.$params = qVar;
}
@Override
@NotNull
public final myobfuscated.mk2.c<Unit> create(Object obj, @NotNull myobfuscated.mk2.c<?> cVar) {
InstagramPhotosServiceImpl$loadPhotos$1 instagramPhotosServiceImpl$loadPhotos$1 = new InstagramPhotosServiceImpl$loadPhotos$1(this.this$0, this.$params, cVar);
instagramPhotosServiceImpl$loadPhotos$1.L$0 = obj;
return instagramPhotosServiceImpl$loadPhotos$1;
}
@Override
public final Object invoke(@NotNull f<? super i<? extends d0>> fVar, myobfuscated.mk2.c<? super Unit> cVar) {
return ((InstagramPhotosServiceImpl$loadPhotos$1) create(fVar, cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
Unit unit;
URL url;
a.C0942a c0942a;
myobfuscated.bz1.b b;
myobfuscated.az1.a aVar;
String string;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i = this.label;
if (i == 0) {
myobfuscated.ik2.i.b(obj);
f fVar = (f) this.L$0;
b bVar = this.this$0;
unit = null;
if (bVar.b == null) {
try {
string = bVar.a.a().getSharedPreferences("InstagramPrefs", 4).getString("InstagramPrefs", null);
} catch (Exception e) {
PALog.d("d", "Got unexpected exception: " + e.getMessage(), e);
}
if (!TextUtils.isEmpty(string)) {
aVar = new myobfuscated.az1.a(h.c(string).l());
bVar.b = aVar;
}
aVar = null;
bVar.b = aVar;
}
q qVar = this.$params;
int i2 = qVar.b;
int i3 = qVar.a;
int i4 = ((i2 + i3) - 1) / i3;
String str = qVar.f;
if (str == null || str.length() == 0) {
b bVar2 = this.this$0;
bVar2.getClass();
if (i4 == 0) {
myobfuscated.az1.a aVar2 = bVar2.b;
url = new URL(com.appsflyer.internal.c.o("https://graph.instagram.com/", (aVar2 == null || (c0942a = aVar2.c) == null) ? null : c0942a.a, "/media?fields=id,media_type,media_url,thumbnail_url,permalink&access_token=", aVar2 != null ? aVar2.a : null));
} else {
url = null;
}
} else {
url = new URL(this.$params.f);
}
if (url != null) {
b bVar3 = this.this$0;
bVar3.getClass();
try {
InputStream inputStream = url.openConnection().getInputStream();
try {
int i5 = myobfuscated.ud0.c.a;
Scanner useDelimiter = new Scanner(inputStream).useDelimiter("\\A");
myobfuscated.bz1.c cVar = (myobfuscated.bz1.c) new Gson().fromJson(useDelimiter.hasNext() ? useDelimiter.next() : "", (Class<Object>) myobfuscated.bz1.c.class);
List d = cVar != null ? b.d(cVar) : null;
if (d == null) {
d = EmptyList.INSTANCE;
}
i iVar = new i(d, (cVar == null || (b = cVar.b()) == null) ? null : b.a(), null, null, 12);
myobfuscated.sr.e.s(inputStream, null);
this.label = 1;
if (fVar.emit(iVar, this) == coroutineSingletons) {
return coroutineSingletons;
}
} finally {
}
} catch (FileNotFoundException e2) {
PALog.c("InstagramImageController : FileNotFoundException", "Cause of OAuthAccessTokenException, error_message: The access_token provided does not match an approved application");
myobfuscated.hw.c cVar2 = bVar3.a;
androidx.fragment.app.h a = cVar2.a();
androidx.fragment.app.h a2 = cVar2.a();
myobfuscated.az1.d.b(a, a2 != null ? a2.getLifecycle() : null);
throw e2;
} catch (Exception e3) {
PALog.d("InstagramImageController", "requestUserImages", e3);
throw e3;
}
}
if (unit == null) {
return Unit.a;
}
throw new Exception("url is null");
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
myobfuscated.ik2.i.b(obj);
}
unit = Unit.a;
if (unit == null) {
}
}
}