Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 DropboxMediaServiceImpl$loadAlbums$1.java 源代码,内容仅作参考
package com.picsart.chooser.media.albums.media.service.dropbox;
import com.dropbox.core.v2.files.m;
import com.picsart.chooser.media.AlbumType;
import com.picsart.chooser.media.albums.media.service.dropbox.a;
import com.picsart.studio.R;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref$IntRef;
import kotlin.jvm.internal.Ref$ObjectRef;
import myobfuscated.ik2.i;
import myobfuscated.jk2.p;
import myobfuscated.mk2.c;
import myobfuscated.ok2.d;
import myobfuscated.ot.g;
import myobfuscated.q50.b;
import myobfuscated.sn2.f;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010 \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/q50/b;", "", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@d(c = "com.picsart.chooser.media.albums.media.service.dropbox.DropboxMediaServiceImpl$loadAlbums$1", f = "DropboxMediaServiceImpl.kt", l = {97}, m = "invokeSuspend")
final class DropboxMediaServiceImpl$loadAlbums$1 extends SuspendLambda implements Function2<f<? super List<? extends b>>, c<? super Unit>, Object> {
final String $name;
final String $path;
private Object L$0;
int label;
final a this$0;
public DropboxMediaServiceImpl$loadAlbums$1(a aVar, String str, String str2, c<? super DropboxMediaServiceImpl$loadAlbums$1> cVar) {
super(2, cVar);
this.this$0 = aVar;
this.$path = str;
this.$name = str2;
}
@Override
@NotNull
public final c<Unit> create(Object obj, @NotNull c<?> cVar) {
DropboxMediaServiceImpl$loadAlbums$1 dropboxMediaServiceImpl$loadAlbums$1 = new DropboxMediaServiceImpl$loadAlbums$1(this.this$0, this.$path, this.$name, cVar);
dropboxMediaServiceImpl$loadAlbums$1.L$0 = obj;
return dropboxMediaServiceImpl$loadAlbums$1;
}
@Override
public Object invoke(f<? super List<? extends b>> fVar, c<? super Unit> cVar) {
return invoke2((f<? super List<b>>) fVar, cVar);
}
public final Object invoke2(@NotNull f<? super List<b>> fVar, c<? super Unit> cVar) {
return ((DropboxMediaServiceImpl$loadAlbums$1) create(fVar, cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i = this.label;
try {
if (i == 0) {
i.b(obj);
f fVar = (f) this.L$0;
myobfuscated.ph.a invoke = this.this$0.b.invoke();
String string = this.this$0.c.a.getSharedPreferences("dropbox_preferences", 0).getString("dropbox_access_token", null);
if (string == null) {
throw new IllegalArgumentException("Dropbox cached access token is null".toString());
}
List<m> list = ((com.dropbox.core.v2.files.a) invoke.f).a(this.$path).a;
ArrayList arrayList = new ArrayList();
Ref$IntRef ref$IntRef = new Ref$IntRef();
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
Intrinsics.e(list);
for (m mVar : list) {
String a = mVar.a();
Intrinsics.checkNotNullExpressionValue(a, "getName(...)");
String lowerCase = a.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
if (a.C0409a.a(lowerCase)) {
if (ref$IntRef.element == 0) {
g gVar = new g();
gVar.u("path", mVar.b());
gVar.u("size", "w640h480");
gVar.u("format", "jpeg");
ref$ObjectRef.element = "https://content.dropboxapi.com/2/files/get_thumbnail?authorization=Bearer%20" + string + "&arg=" + gVar;
}
ref$IntRef.element++;
}
}
if (ref$IntRef.element > 0) {
b bVar = new b(this.$path);
String str = this.$name;
String str2 = this.$path;
a aVar = this.this$0;
bVar.b = str;
bVar.c = str2;
int i2 = ref$IntRef.element;
bVar.g = i2;
bVar.b(i2 + " " + aVar.a.b(R.string.gen_images, ""));
bVar.e = (String) ref$ObjectRef.element;
AlbumType albumType = AlbumType.DROPBOX;
bVar.a(albumType);
bVar.c(albumType.getValue());
arrayList.add(bVar);
}
ArrayList arrayList2 = new ArrayList();
for (Object obj2 : list) {
if (obj2 instanceof com.dropbox.core.v2.files.g) {
arrayList2.add(obj2);
}
}
ArrayList arrayList3 = new ArrayList(p.n(arrayList2, 10));
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
com.dropbox.core.v2.files.g gVar2 = (com.dropbox.core.v2.files.g) it.next();
String str3 = gVar2.b;
Intrinsics.checkNotNullExpressionValue(str3, "getPathLower(...)");
b bVar2 = new b(str3);
bVar2.b = gVar2.a;
bVar2.f = R.drawable.ic_dropbox_folder_onboarding;
bVar2.c = gVar2.b;
AlbumType albumType2 = AlbumType.DROPBOX;
bVar2.a(albumType2);
bVar2.c(albumType2.getValue());
arrayList3.add(bVar2);
}
arrayList.addAll(arrayList3);
this.label = 1;
if (fVar.emit(arrayList, this) == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
i.b(obj);
}
return Unit.a;
} catch (Throwable th) {
throw new IllegalStateException(th.toString());
}
}
}