package u; import android.os.Bundle; import android.util.Pair; import androidx.room.QueryInterceptorStatement; import bf.b; import bk.h; import bl.e; import com.afollestad.materialdialogs.MaterialDialog; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.meituan.robust.ChangeQuickRedirect; import com.meituan.robust.PatchProxy; import com.meituan.robust.PatchProxyResult; import com.shizhuang.duapp.R; import com.shizhuang.duapp.filament.biz.FilamentManagerV2; import com.shizhuang.duapp.hybrid.HtmlCacheEnhancer; import com.shizhuang.duapp.libs.customer_service.api.OctopusConsultSource; import com.shizhuang.duapp.libs.customer_service.api.OctopusMerchant; import com.shizhuang.duapp.libs.customer_service.model.entity.send.ActionMerchantConnect; import com.shizhuang.duapp.libs.customer_service.service.CustomerConfig; import com.shizhuang.duapp.libs.customer_service.service.f; import com.shizhuang.duapp.libs.yeezy.core.ConfigHelper; import com.shizhuang.duapp.modules.depositv2.module.apply.view.OrderCountDownView; import com.shizhuang.duapp.modules.feed.circle.fragment.CircleAdminDialog; import com.shizhuang.duapp.modules.feed.circle.fragment.GiveUpCircleAdminDialog; import com.shizhuang.duapp.modules.home.ui.DeepLinkActivity; import com.shizhuang.duapp.modules.imagepicker.ImagePickerActivity; import com.shizhuang.duapp.modules.imagepicker.fragment.CameraPermissionDialog; import com.shizhuang.duapp.modules.user.setting.common.ui.SettingActivity; import com.shizhuang.dulivestream.recording.service.VideoRecordingStudio; import com.tinode.core.PromisedReply; import fs.a; import java.io.ByteArrayInputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import js.k; import ls.i; import ls.j; import uk.n; import xk.c; import xk.d; /* compiled from: R8$$SyntheticClass */ public final /* synthetic */ class d0 implements Runnable { public final /* synthetic */ int b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ Object f38739c; public /* synthetic */ d0(Object obj, int i) { this.b = i; this.f38739c = obj; } public final void run() { String str; boolean z; GiveUpCircleAdminDialog giveUpCircleAdminDialog; switch (this.b) { case 0: ((QueryInterceptorStatement) this.f38739c).lambda$executeInsert$2(); return; case 1: FilamentManagerV2.d((FilamentManagerV2) this.f38739c); return; case 2: HtmlCacheEnhancer.b((HtmlCacheEnhancer) this.f38739c); return; case 3: f fVar = (f) this.f38739c; if (!PatchProxy.proxy(new Object[0], fVar, f.changeQuickRedirect, false, 26819, new Class[0], Void.TYPE).isSupported) { try { e.a(fVar.e); return; } catch (Exception e) { n.f("CUSTOM_LOG", "clearImageCache failed", e); return; } } else { return; } case 4: c cVar = (c) this.f38739c; if (PatchProxy.proxy(new Object[0], cVar, c.changeQuickRedirect, false, 26972, new Class[0], Void.TYPE).isSupported || cVar.k.d()) { return; } if (cVar.x.getAndSet(true)) { n.c("MERCHANT_SERVICE", "connect is Sending"); return; } CustomerConfig.MsgType msgType = CustomerConfig.MsgType.MERCHANT_CONNECT; ActionMerchantConnect actionMerchantConnect = new ActionMerchantConnect(); OctopusConsultSource octopusConsultSource = cVar.f.d; Map<String, Object> p = cVar.p(); String str2 = p != null ? (String) p.get("user") : null; h hVar = cVar.f.f; if (octopusConsultSource != null) { actionMerchantConnect.setSource(octopusConsultSource.sourceId); actionMerchantConnect.setSpuId(octopusConsultSource.spuId); actionMerchantConnect.setOrderNum(octopusConsultSource.orderNo); actionMerchantConnect.setProblemId(octopusConsultSource.problemId); OctopusMerchant octopusMerchant = octopusConsultSource.merchant; if (octopusMerchant != null) { actionMerchantConnect.setMerchantId(octopusMerchant.getMerchantId()); actionMerchantConnect.setBrandId(octopusMerchant.getBrandId()); } actionMerchantConnect.setConsultTitle(octopusConsultSource.consultTitle); } if (hVar != null) { actionMerchantConnect.setUserId(hVar.b()); actionMerchantConnect.setUsername(hVar.c()); actionMerchantConnect.setUserIcon(hVar.a()); PatchProxyResult proxy = PatchProxy.proxy(new Object[0], hVar, h.changeQuickRedirect, false, 23216, new Class[0], String.class); actionMerchantConnect.setMobile(proxy.isSupported ? (String) proxy.result : null); } actionMerchantConnect.setFromTopic(str2); actionMerchantConnect.setChannel("10001"); actionMerchantConnect.setDeviceId(cVar.f.b); actionMerchantConnect.setVersion(cVar.f.f38999a); actionMerchantConnect.setFirstConnect(cVar.f40054u); PromisedReply<Pair<Boolean, ei1.c>> publishAction = cVar.publishAction(actionMerchantConnect, msgType.code(), msgType.ct(), true); n.c("MERCHANT_SERVICE", "sendConnectAction"); if (publishAction == null) { n.c("MERCHANT_SERVICE", "sendConnectAction reply is null"); cVar.x.getAndSet(false); return; } publishAction.h(new xk.e(cVar), null).i(new d(cVar)); return; case 5: ConfigHelper.ConfigPrepareListener configPrepareListener = (ConfigHelper.ConfigPrepareListener) this.f38739c; if (!PatchProxy.proxy(new Object[]{configPrepareListener}, null, ConfigHelper.changeQuickRedirect, true, 38117, new Class[]{ConfigHelper.ConfigPrepareListener.class}, Void.TYPE).isSupported) { if (!PatchProxy.proxy(new Object[0], null, ConfigHelper.changeQuickRedirect, true, 38109, new Class[0], Void.TYPE).isSupported) { long currentTimeMillis = System.currentTimeMillis(); if ("1e4e9a461f9b4fb09d6a4ae12c1eca83".equals(fs.c.f32447g)) { str = "https://apk.poizon.com/duApp/Android_Config/yeezy/source/version_" + fs.c.f + ".txt"; } else if ("77e5d67767c449fd94cba620915045f4".equals(fs.c.f32447g)) { str = "https://apk.poizon.com/poizonX/Android_Config/yeezy/source/version_" + fs.c.f + ".txt"; } else { str = "https://apk.poizon.com/duApp/Android_Config/yeezy/source/version_" + fs.c.f + ".txt"; } ls.h.b("request Yeezy config from " + str); byte[] a5 = a.a(str); if (a5 != null) { PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{a5}, null, ConfigHelper.changeQuickRedirect, true, 38110, new Class[]{byte[].class}, Boolean.TYPE); if (proxy2.isSupported) { z = ((Boolean) proxy2.result).booleanValue(); } else { Gson gson = new Gson(); try { ArrayList arrayList = new ArrayList(); ArrayList arrayList2 = new ArrayList(); Iterator<JsonElement> it2 = ((JsonArray) gson.fromJson((Reader) new InputStreamReader(new ByteArrayInputStream(a5)), JsonArray.class)).iterator(); while (it2.hasNext()) { JsonObject jsonObject = (JsonObject) it2.next(); String json = gson.toJson((JsonElement) jsonObject); String asString = jsonObject.get("id").getAsString(); i.b(ConfigHelper.d(asString), json); if ("raw".equals(jsonObject.get("type").getAsString())) { arrayList.add(asString); } if (jsonObject.get("preloadPriority").getAsInt() > 0) { arrayList2.add(asString); } } i.b(ConfigHelper.c(), gson.toJson(arrayList)); i.b(ConfigHelper.b(), gson.toJson(arrayList2)); z = true; } catch (Exception e6) { ls.h.a("jsonToObjects error.", e6); z = false; } } if (z) { if (!PatchProxy.proxy(new Object[0], null, ConfigHelper.changeQuickRedirect, true, 38106, new Class[0], Void.TYPE).isSupported) { i.b(ConfigHelper.a(), Boolean.TRUE); } ls.h.b("prepare config cost " + (System.currentTimeMillis() - currentTimeMillis) + " ms"); } } ConfigHelper.i(); ls.h.d("no yeezy entry"); } if (configPrepareListener != null) { j.b(new b0(configPrepareListener, 7)); return; } return; } return; case 6: k kVar = (k) this.f38739c; if (!PatchProxy.proxy(new Object[0], kVar, k.changeQuickRedirect, false, 38341, new Class[0], Void.TYPE).isSupported) { kVar.f34435a.onPendingDownload(); return; } return; case 7: OrderCountDownView orderCountDownView = (OrderCountDownView) this.f38739c; if (!PatchProxy.proxy(new Object[0], orderCountDownView, OrderCountDownView.changeQuickRedirect, false, 90227, new Class[0], Void.TYPE).isSupported && !PatchProxy.proxy(new Object[0], orderCountDownView, OrderCountDownView.changeQuickRedirect, false, 90225, new Class[0], Void.TYPE).isSupported) { orderCountDownView.b(R.id.llCountDown).setVisibility(0); long nanoTime = (orderCountDownView.e - ((System.nanoTime() - orderCountDownView.f) / 1000000)) / 1000; if (nanoTime < 0) { orderCountDownView.b(R.id.llCountDown).setVisibility(8); orderCountDownView.b(R.id.llCountDown).removeCallbacks(orderCountDownView.f12415c); orderCountDownView.d.run(); return; } long j = nanoTime / 60; long j12 = j / 60; int round = Math.round((float) (j12 / 24)); int round2 = Math.round((float) (j12 % 24)); int round3 = Math.round((float) (j % 60)); int round4 = Math.round((float) (nanoTime % 60)); if (nanoTime >= 86400) { String format = String.format("%02d:%02d:%02d", Integer.valueOf(round2), Integer.valueOf(round3), Integer.valueOf(round4)); orderCountDownView.a(R.id.tvSendCountDownDay).setText("" + round); orderCountDownView.b(R.id.tvSendCountDownDayUnit).setVisibility(0); orderCountDownView.a(R.id.tvSendCountDownHour).setText(format); } else { String format2 = String.format("%d:%02d:%02d", Integer.valueOf(round2), Integer.valueOf(round3), Integer.valueOf(round4)); orderCountDownView.a(R.id.tvSendCountDownDay).setText(""); orderCountDownView.b(R.id.tvSendCountDownDayUnit).setVisibility(8); orderCountDownView.a(R.id.tvSendCountDownHour).setText(format2); } orderCountDownView.b(R.id.llCountDown).postDelayed(orderCountDownView.f12415c, 1000); return; } return; case 8: CircleAdminDialog circleAdminDialog = (CircleAdminDialog) this.f38739c; if (!PatchProxy.proxy(new Object[0], circleAdminDialog, CircleAdminDialog.changeQuickRedirect, false, 144072, new Class[0], Void.TYPE).isSupported) { if (circleAdminDialog.f) { String str3 = circleAdminDialog.f15090h; ChangeQuickRedirect changeQuickRedirect = GiveUpCircleAdminDialog.changeQuickRedirect; PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{str3}, null, GiveUpCircleAdminDialog.changeQuickRedirect, true, 144285, new Class[]{String.class}, GiveUpCircleAdminDialog.class); if (proxy3.isSupported) { giveUpCircleAdminDialog = (GiveUpCircleAdminDialog) proxy3.result; } else { giveUpCircleAdminDialog = new GiveUpCircleAdminDialog(); Bundle bundle = new Bundle(); bundle.putString("circle_id_key", str3); giveUpCircleAdminDialog.setArguments(bundle); } giveUpCircleAdminDialog.k(circleAdminDialog.getFragmentManager()); return; } MaterialDialog.b bVar = new MaterialDialog.b(circleAdminDialog.getContext()); bVar.b("确认退出这个圈子?"); bVar.l = "确认退出"; bVar.n = "再想想"; bVar.f2882u = new eb0.c(circleAdminDialog); bVar.f2883v = b.d; bVar.l(); return; } return; case 9: DeepLinkActivity deepLinkActivity = (DeepLinkActivity) this.f38739c; if (!PatchProxy.proxy(new Object[0], deepLinkActivity, DeepLinkActivity.changeQuickRedirect, false, 156534, new Class[0], Void.TYPE).isSupported) { deepLinkActivity.setResult(-1); deepLinkActivity.finish(); return; } return; case 10: ImagePickerActivity imagePickerActivity = (ImagePickerActivity) this.f38739c; if (!PatchProxy.proxy(new Object[0], imagePickerActivity, ImagePickerActivity.changeQuickRedirect, false, 174862, new Class[0], Void.TYPE).isSupported) { CameraPermissionDialog e12 = CameraPermissionDialog.e(3); imagePickerActivity.e = e12; e12.f(new p6.h(imagePickerActivity)); imagePickerActivity.e.show(imagePickerActivity.getSupportFragmentManager(), (String) null); return; } return; case 11: SettingActivity settingActivity = (SettingActivity) this.f38739c; if (!PatchProxy.proxy(new Object[0], settingActivity, SettingActivity.changeQuickRedirect, false, 326351, new Class[0], Void.TYPE).isSupported) { settingActivity.g(); return; } return; default: VideoRecordingStudio.a((VideoRecordingStudio) this.f38739c); return; } } }