得物.apk(点击下载) / ArShoeBytedanceDriver$prepareSo$1.java
package com.shizhuang.duapp.modules.mall_ar.utils.arshoe.bytedance;
import a.f;
import android.content.Context;
import android.os.SystemClock;
import androidx.activity.ComponentActivity;
import br0.a;
import com.alibaba.fastjson.JSONObject;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.shizhuang.duapp.modules.mall_ar.utils.arshoe.ArShoePermissionHelper;
import com.shizhuang.duapp.modules.mall_ar.utils.arshoe.OnArShoeOperationListener;
import com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback;
import com.shizhuang.duapp.stream.MediaSdkManager;
import com.shizhuang.duapp.stream.util.ResourceHelper;
import dr0.b;
import dr0.d;
import dr0.g;
import fd.n;
import java.io.File;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Lambda;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import s9.c;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 4, 2})
/* compiled from: ArShoeBytedanceDriver.kt */
public final class ArShoeBytedanceDriver$prepareSo$1 extends Lambda implements Function1<String, Unit> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ComponentActivity $activity;
public final /* synthetic */ ArShoeBytedanceDriver this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ArShoeBytedanceDriver$prepareSo$1(ArShoeBytedanceDriver arShoeBytedanceDriver, ComponentActivity componentActivity) {
super(1);
this.this$0 = arShoeBytedanceDriver;
this.$activity = componentActivity;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(String str) {
invoke(str);
return Unit.INSTANCE;
}
public final void invoke(@NotNull String str) {
if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 208991, new Class[]{String.class}, Void.TYPE).isSupported) {
this.this$0.j = str;
MediaSdkManager.f26043a.f(this.$activity, new Function0<Unit>(this) {
/* class com.shizhuang.duapp.modules.mall_ar.utils.arshoe.bytedance.ArShoeBytedanceDriver$prepareSo$1.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ArShoeBytedanceDriver$prepareSo$1 this$0;
{
this.this$0 = r1;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
c cVar;
File[] listFiles;
boolean z = false;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 208992, new Class[0], Void.TYPE).isSupported) {
this.this$0.this$0.f.set(SystemClock.elapsedRealtime());
a.f1838a.h();
ArShoeBytedanceDriver$prepareSo$1 arShoeBytedanceDriver$prepareSo$1 = this.this$0;
ArShoeBytedanceDriver arShoeBytedanceDriver = arShoeBytedanceDriver$prepareSo$1.this$0;
g gVar = g.f31596a;
ComponentActivity componentActivity = arShoeBytedanceDriver$prepareSo$1.$activity;
AnonymousClass1 r102 = new ArShoeDownloadCallback(this) {
/* class com.shizhuang.duapp.modules.mall_ar.utils.arshoe.bytedance.ArShoeBytedanceDriver$prepareSo$1.AnonymousClass1.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AnonymousClass1 f19179a;
/* JADX WARN: Incorrect args count in method signature: ()V */
{
this.f19179a = r1;
}
@Override // com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback
public void onDownloadError() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 208995, new Class[0], Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback
public void onDownloadProgress(float f, long j, long j12) {
Object[] objArr = {new Float(f), new Long(j), new Long(j12)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Long.TYPE;
boolean z = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 208993, new Class[]{Float.TYPE, cls, cls}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback
public void onDownloadSuccess() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 208994, new Class[0], Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback
public void onUnZipError() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 208997, new Class[0], Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.mall_ar.utils.arshoe.download.ArShoeDownloadCallback
public void onUnZipSuccess(@Nullable String str) {
if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 208996, new Class[]{String.class}, Void.TYPE).isSupported) {
ArShoeBytedanceDriver$prepareSo$1 arShoeBytedanceDriver$prepareSo$1 = this.f19179a.this$0;
arShoeBytedanceDriver$prepareSo$1.this$0.i = str;
ArShoePermissionHelper.f19172a.a(arShoeBytedanceDriver$prepareSo$1.$activity, new ArShoeBytedanceDriver$prepareSo$1$1$1$onUnZipSuccess$1(this), new ArShoeBytedanceDriver$prepareSo$1$1$1$onUnZipSuccess$2(this), new ArShoeBytedanceDriver$prepareSo$1$1$1$onUnZipSuccess$3(this));
}
}
};
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{componentActivity, r102}, gVar, g.changeQuickRedirect, false, 209011, new Class[]{Context.class, ArShoeDownloadCallback.class}, c.class);
if (proxy.isSupported) {
cVar = (c) proxy.result;
} else {
StringBuilder sb2 = new StringBuilder();
sb2.append(ResourceHelper.f26082a.e(componentActivity));
File file = new File(f.g(sb2, File.separator, "ArShoeModel"));
if (!file.exists()) {
file.mkdirs();
}
File[] listFiles2 = file.listFiles(d.f31593a);
if (listFiles2 != null) {
if ((!(listFiles2.length == 0)) && (listFiles = listFiles2[0].listFiles(dr0.c.f31592a)) != null) {
if (!(listFiles.length == 0)) {
r102.onUnZipSuccess(file.getAbsolutePath());
cVar = null;
}
}
}
String string = ((JSONObject) n.c("community_module", "ModelResourceList", JSONObject.class, new JSONObject(MapsKt__MapsJVMKt.mapOf(TuplesKt.to("arshoe", "https://cdn.poizon.com/node-common/0129e0c0-6781-d601-6a29-144b29a87f35.zip"))))).getString("arshoe");
if (string.length() == 0) {
z = true;
}
if (z) {
r102.onDownloadError();
cVar = null;
} else {
cVar = tl.a.o(string, file, new b(r102));
}
}
arShoeBytedanceDriver.m = cVar;
}
}
}, new Function0<Unit>(this) {
/* class com.shizhuang.duapp.modules.mall_ar.utils.arshoe.bytedance.ArShoeBytedanceDriver$prepareSo$1.AnonymousClass2 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ArShoeBytedanceDriver$prepareSo$1 this$0;
{
this.this$0 = r1;
}
@Override // kotlin.jvm.functions.Function0
public final void invoke() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 209001, new Class[0], Void.TYPE).isSupported) {
a.f1838a.g("MediaSdkManager initCvSo failed");
OnArShoeOperationListener onArShoeOperationListener = this.this$0.this$0.d;
if (onArShoeOperationListener != null) {
onArShoeOperationListener.onError("MediaSdkManager initCvSo failed");
}
}
}
});
}
}
}