package com.tencent.mm.plugin.finder.utils; import a32.g; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.graphics.Color; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.media.MediaMetadataRetriever; import android.os.SystemClock; import android.text.Spannable; import android.text.SpannableString; import android.util.Base64; import android.util.Size; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; import androidx.lifecycle.j0; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.StaggeredGridLayoutManager; import b02.f; import bw3.bv1; import bw3.c10; import bw3.dp1; import bw3.dr1; import bw3.fh; import bw3.fl1; import bw3.gq1; import bw3.hq1; import bw3.hu1; import bw3.jw1; import bw3.lw1; import bw3.mq1; import bw3.oj4; import bw3.pp1; import bw3.px0; import bw3.qo0; import bw3.r15; import bw3.r91; import bw3.rp1; import bw3.so3; import bw3.tk0; import bw3.vf; import bw3.wm0; import bw3.y53; import bw3.yk0; import bw3.zl1; import bw3.zv4; import com.google.firebase.analytics.FirebaseAnalytics; import com.tencent.kinda.framework.widget.tools.ConstantsKinda; import com.tencent.mars.cdn.CdnLogic; import com.tencent.mm.R; import com.tencent.mm.autogen.events.FeedDeleteEvent; import com.tencent.mm.autogen.events.FeedUpdateEvent; import com.tencent.mm.autogen.events.FinderExposeInfoChangeEvent; import com.tencent.mm.autogen.mmdata.rpt.FinderPostDeleteStruct; import com.tencent.mm.feature.sight.api.ISightJNIService; import com.tencent.mm.plugin.FinderCommonFeatureService; import com.tencent.mm.plugin.finder.feed.model.BaseFinderFeedLoader; import com.tencent.mm.plugin.finder.feed.model.d1; import com.tencent.mm.plugin.finder.feed.model.internal.BaseFeedLoader; import com.tencent.mm.plugin.finder.feed.model.internal.DataBuffer; import com.tencent.mm.plugin.finder.model.BaseFinderFeed; import com.tencent.mm.plugin.finder.music.FinderImgFeedMusicTag; import com.tencent.mm.plugin.finder.storage.FeedData; import com.tencent.mm.plugin.finder.storage.FinderItem; import com.tencent.mm.plugin.finder.view.FinderBaseMediaBanner; import com.tencent.mm.plugin.finder.view.m0; import com.tencent.mm.protocal.protobuf.FinderAuthInfo; import com.tencent.mm.protocal.protobuf.FinderCommentInfo; import com.tencent.mm.protocal.protobuf.FinderContact; import com.tencent.mm.protocal.protobuf.FinderFeedReportObject; import com.tencent.mm.protocal.protobuf.FinderJumpInfo; import com.tencent.mm.protocal.protobuf.FinderMedia; import com.tencent.mm.protocal.protobuf.FinderMediaReportInfo; import com.tencent.mm.protocal.protobuf.FinderMediaReportObject; import com.tencent.mm.protocal.protobuf.FinderObject; import com.tencent.mm.protocal.protobuf.FinderObjectDesc; import com.tencent.mm.sdk.platformtools.BuildInfo; import com.tencent.mm.sdk.platformtools.LocaleUtil; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MD5Util; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.sdk.platformtools.NetStatusUtil; import com.tencent.mm.sdk.platformtools.Util; import com.tencent.mm.sdk.platformtools.WeChatEnvironment; import com.tencent.mm.storage.t1; import com.tencent.mm.storage.w1; import com.tencent.mm.storage.z1; import com.tencent.mm.ui.MMActivity; import com.tencent.mm.ui.h5; import com.tencent.mm.ui.l5; import com.tencent.mm.ui.x4; import com.tencent.mm.vfs.n2; import com.tencent.mm.vfs.u1; import com.tencent.mm.view.recyclerview.WxRecyclerAdapter; import com.tencent.thumbplayer.core.common.TPMediaCodecProfileLevel; import com.tencent.thumbplayer.tmediacodec.util.MimeTypes; import com.tencent.tinker.loader.hotplug.EnvConsts; import com.tencent.tmassistantsdk.openSDK.QQDownloader.AssistantStore; import com.tencent.tmassistantsdk.storage.table.ClientInfoTable; import d32.ta; import d60.z; import dj1.a; import ek0.x2; import ek4.d0; import ek4.y; import ez1.f1; import i14.y0; import ie1.h; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.reflect.Field; import java.math.RoundingMode; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.regex.Pattern; import kh4.l; import lh4.m; import lh4.o; import m60.g; import mi.jb; import mi.l3; import nf0.e6; import nf0.f4; import nf0.f4$$g; import nf0.u0; import nf0.w0; import org.json.JSONArray; import org.json.JSONObject; import p64.g; import pu1.d3; import pu1.k0; import pu1.k2; import rm1.w9; import sk1.d; import sk1.q; import t32.e2; import t32.j6; import t32.q4; import t32.q5; import t32.u5; import tt1.h0; import tt1.q0; import tt1.v0; import wg4.b0; import wg4.n; import wk1.s1; import xg4.c0; import xg4.r0; import xg4.u; import xg4.v; import xg4.x0; import xg4.y0; import y24.r; import yl1.f0; import ym1.e0; import yz3.j; import zz1.j3; import zz1.t2; import zz1.w3; public final class h4 { /* renamed from: a reason: collision with root package name */ public static final h4 f119006a = new h4(); /* renamed from: b reason: collision with root package name */ public static final String f119007b = "Finder.FinderUtil"; /* renamed from: c reason: collision with root package name */ public static final int f119008c = ((int) MMApplicationContext.getContext().getResources().getDimension(R.dimen.a7n)); /* renamed from: d reason: collision with root package name */ public static final Set<Integer> f119009d = y0.d(2013, -18); /* renamed from: e reason: collision with root package name */ public static final Set<Integer> f119010e = x0.a(2003); /* renamed from: f reason: collision with root package name */ public static final long f119011f = 60000; /* renamed from: g reason: collision with root package name */ public static final long f119012g; /* renamed from: h reason: collision with root package name */ public static final long f119013h; /* renamed from: i reason: collision with root package name */ public static final long f119014i; /* renamed from: j reason: collision with root package name */ public static final long f119015j; /* renamed from: k reason: collision with root package name */ public static final long f119016k; /* renamed from: l reason: collision with root package name */ public static final Rect f119017l = new Rect(); /* renamed from: m reason: collision with root package name */ public static long f119018m = -1; /* renamed from: n reason: collision with root package name */ public static final wg4.g f119019n = wg4.h.a(h.f119055d); /* renamed from: o reason: collision with root package name */ public static final wg4.g f119020o = wg4.h.a(i.f119056d); /* renamed from: p reason: collision with root package name */ public static final wg4.g f119021p = wg4.h.a(c.f119046d); /* renamed from: q reason: collision with root package name */ public static final wg4.g f119022q = wg4.h.a(f.f119053d); /* renamed from: r reason: collision with root package name */ public static final int f119023r = MMApplicationContext.getContext().getResources().getDisplayMetrics().heightPixels; /* renamed from: s reason: collision with root package name */ public static JSONObject f119024s; /* renamed from: t reason: collision with root package name */ public static boolean f119025t = true; /* renamed from: u reason: collision with root package name */ public static int f119026u = zz1.e.V5.t().intValue(); /* renamed from: v reason: collision with root package name */ public static int f119027v = ((Number) ((tl1.c) ((n) zz1.e.W5).getValue()).t()).intValue(); /* renamed from: w reason: collision with root package name */ public static HashSet<Integer> f119028w = new HashSet<>(); /* renamed from: x reason: collision with root package name */ public static String f119029x; public static final class a { /* renamed from: a reason: collision with root package name */ public final boolean f119030a; /* renamed from: b reason: collision with root package name */ public final boolean f119031b; /* renamed from: c reason: collision with root package name */ public final boolean f119032c; /* renamed from: d reason: collision with root package name */ public final boolean f119033d; /* renamed from: e reason: collision with root package name */ public final String f119034e; /* renamed from: f reason: collision with root package name */ public final String f119035f; /* renamed from: g reason: collision with root package name */ public final String f119036g; /* renamed from: h reason: collision with root package name */ public final String f119037h; /* renamed from: i reason: collision with root package name */ public final boolean f119038i; /* renamed from: j reason: collision with root package name */ public final boolean f119039j; /* renamed from: k reason: collision with root package name */ public final boolean f119040k; /* renamed from: l reason: collision with root package name */ public boolean f119041l; /* renamed from: m reason: collision with root package name */ public final boolean f119042m; public a(boolean z15, boolean z16, boolean z17, boolean z18, String str, String str2, String str3, String str4, boolean z19, boolean z25, boolean z26, boolean z27, boolean z28) { m.g(str, "forwardTip"); m.g(str2, "snsTip"); m.g(str3, "favTip"); m.g(str4, "forwardWeWorkTip"); this.f119030a = z15; this.f119031b = z16; this.f119032c = z17; this.f119033d = z18; this.f119034e = str; this.f119035f = str2; this.f119036g = str3; this.f119037h = str4; this.f119038i = z19; this.f119039j = z25; this.f119040k = z26; this.f119041l = z27; this.f119042m = z28; } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof a)) { return false; } a aVar = (a) obj; return this.f119030a == aVar.f119030a && this.f119031b == aVar.f119031b && this.f119032c == aVar.f119032c && this.f119033d == aVar.f119033d && m.b(this.f119034e, aVar.f119034e) && m.b(this.f119035f, aVar.f119035f) && m.b(this.f119036g, aVar.f119036g) && m.b(this.f119037h, aVar.f119037h) && this.f119038i == aVar.f119038i && this.f119039j == aVar.f119039j && this.f119040k == aVar.f119040k && this.f119041l == aVar.f119041l && this.f119042m == aVar.f119042m; } public int hashCode() { boolean z15 = this.f119030a; int i15 = 1; if (z15) { z15 = true; } int i16 = z15 ? 1 : 0; int i17 = z15 ? 1 : 0; int i18 = z15 ? 1 : 0; int i19 = i16 * 31; boolean z16 = this.f119031b; if (z16) { z16 = true; } int i25 = z16 ? 1 : 0; int i26 = z16 ? 1 : 0; int i27 = z16 ? 1 : 0; int i28 = (i19 + i25) * 31; boolean z17 = this.f119032c; if (z17) { z17 = true; } int i29 = z17 ? 1 : 0; int i35 = z17 ? 1 : 0; int i36 = z17 ? 1 : 0; int i37 = (i28 + i29) * 31; boolean z18 = this.f119033d; if (z18) { z18 = true; } int i38 = z18 ? 1 : 0; int i39 = z18 ? 1 : 0; int i45 = z18 ? 1 : 0; int hashCode = (((((((((i37 + i38) * 31) + this.f119034e.hashCode()) * 31) + this.f119035f.hashCode()) * 31) + this.f119036g.hashCode()) * 31) + this.f119037h.hashCode()) * 31; boolean z19 = this.f119038i; if (z19) { z19 = true; } int i46 = z19 ? 1 : 0; int i47 = z19 ? 1 : 0; int i48 = z19 ? 1 : 0; int i49 = (hashCode + i46) * 31; boolean z25 = this.f119039j; if (z25) { z25 = true; } int i55 = z25 ? 1 : 0; int i56 = z25 ? 1 : 0; int i57 = z25 ? 1 : 0; int i58 = (i49 + i55) * 31; boolean z26 = this.f119040k; if (z26) { z26 = true; } int i59 = z26 ? 1 : 0; int i65 = z26 ? 1 : 0; int i66 = z26 ? 1 : 0; int i67 = (i58 + i59) * 31; boolean z27 = this.f119041l; if (z27) { z27 = true; } int i68 = z27 ? 1 : 0; int i69 = z27 ? 1 : 0; int i75 = z27 ? 1 : 0; int i76 = (i67 + i68) * 31; boolean z28 = this.f119042m; if (!z28) { i15 = z28 ? 1 : 0; } return i76 + i15; } public String toString() { return "ActionMenuInfo(forwardDisable=" + this.f119030a + ", snsDisable=" + this.f119031b + ", favDisable=" + this.f119032c + ", forwardWeWorkDisable=" + this.f119033d + ", forwardTip=" + this.f119034e + ", snsTip=" + this.f119035f + ", favTip=" + this.f119036g + ", forwardWeWorkTip=" + this.f119037h + ", hideForward=" + this.f119038i + ", hideSns=" + this.f119039j + ", hideGlobalFav=" + this.f119040k + ", hideForwardWeWork=" + this.f119041l + ", disableGlobalFav=" + this.f119042m + ')'; } } public static final class c extends o implements kh4.a<Integer> { /* renamed from: d reason: collision with root package name */ public static final c f119046d = new c(); public c() { super(0); } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public Integer invoke() { return Integer.valueOf((int) MMApplicationContext.getContext().getResources().getDimension(R.dimen.f359041bo)); } } public static final class d extends o implements kh4.a<String> { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ String f119047d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ long f119048e; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public d(String str, long j15) { super(0); this.f119047d = str; this.f119048e = j15; } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public String invoke() { return "tag=" + this.f119047d + " feedId=" + m60.d.p(this.f119048e); } } public static final class e implements Runnable { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ k2 f119049d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ String f119050e; public static final class a implements f4$$g { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ yl1.f f119051d; public a(yl1.f fVar) { this.f119051d = fVar; } @Override // nf0.f4$$g public boolean b() { return false; } @Override // nf0.f4$$g public void c() { String str = h4.f119007b; Log.i(str, "delete msg end... " + this.f119051d.f346704d1 + ' ' + this.f119051d.field_sessionId); } } public static final class b extends o implements kh4.a<String> { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ Exception f119052d; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(Exception exc) { super(0); this.f119052d = exc; } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public String invoke() { String message = this.f119052d.getMessage(); return message == null ? "" : message; } } public e(k2 k2Var, String str) { this.f119049d = k2Var; this.f119050e = str; } /* JADX WARNING: Removed duplicated region for block: B:27:0x0057 */ /* JADX WARNING: Removed duplicated region for block: B:28:0x005c */ /* JADX WARNING: Removed duplicated region for block: B:31:0x0073 */ /* JADX WARNING: Removed duplicated region for block: B:32:0x0075 */ /* JADX WARNING: Removed duplicated region for block: B:34:0x0078 */ /* JADX WARNING: Removed duplicated region for block: B:36:0x0094 */ public final void run() { boolean z15; String str; String str2; w1.a aVar = w1.a.f175181bh; try { k2 k2Var = this.f119049d; if (k2Var != null) { String str3 = k2Var.field_username; if (str3 == null || str3.length() == 0) { Log.i(h4.f119007b, "[delAliasInfo] source:" + this.f119050e + " , deletingInfo empty"); return; } } k2 k2Var2 = this.f119049d; if (!(k2Var2 == null || (str2 = k2Var2.field_username) == null)) { if (str2.length() > 0) { z15 = true; if (!z15) { str = this.f119049d.field_username; } else { str = z.s().i().J(aVar, ""); } m.f(str, "aliasUserName"); if (!(str.length() != 0)) { Log.i(h4.f119007b, "[delAliasInfo] source:" + this.f119050e + " ,aliasUserName empty return "); return; } k2 k2Var3 = this.f119049d; if (k2Var3 == null) { k2Var3 = new k2(); k2Var3.field_username = str; k2Var3.field_type = 2; Log.i(h4.f119007b, "[delAliasInfo] insert DeletingInfo Result : " + ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).gO0().insert(k2Var3)); } Log.i(h4.f119007b, "[delAliasInfo] source:" + this.f119050e + " ,aliasUserName:" + str); w3 oO0 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).Py(); t2 bO0 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).n5(); LinkedList<f0> fb5 = oO0.fb(str); if (fb5 != null) { int i15 = 0; for (T t15 : fb5) { int i16 = i15 + 1; if (i15 >= 0) { String str4 = t15.field_sessionId; m.f(str4, "it.field_sessionId"); yl1.f fVar = bO0.get(str4); boolean deleteNotify = bO0.deleteNotify(fVar.systemRowid, false); String str5 = h4.f119007b; Log.i(str5, "delete conv begin[" + deleteNotify + "]... " + fVar.f346704d1 + ' ' + fVar.field_sessionId); if (deleteNotify) { f4.h(fVar.field_sessionId, new a(fVar)); } String str6 = fVar.field_sessionId; m.f(str6, "conv.field_sessionId"); oO0.Ga(str6, false); bO0.doNotify(fVar.field_sessionId, 6, fVar); Log.i(str5, "delete conv end... " + fVar.f346704d1 + ' ' + fVar.field_sessionId); i15 = i16; k2Var3 = k2Var3; } else { u.l(); throw null; } } } q Ga = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).jO0().Ga(str); if (Ga != null) { q qVar = Ga.systemRowid != -1 ? Ga : null; if (qVar != null) { ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).jO0().delete(qVar.systemRowid); } } z.s().i().L(w1.a.f175206ch, ""); z.s().i().L(w1.a.f175232dh, ""); z.s().i().L(aVar, ""); ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).gO0().delete(k2Var3, "username"); return; } } z15 = false; if (!z15) { } m.f(str, "aliasUserName"); if (str.length() != 0) { } if (!(str.length() != 0)) { } } catch (Exception e15) { String str7 = h4.f119007b; Log.i(str7, "[delAliasInfo] exception:" + e15.getMessage()); Log.printErrStackTrace(str7, e15, "", new Object[0]); g.a.b(r32.a.f292946b, "delAliasInfo", false, null, null, false, false, new b(e15), 60, null); throw e15; } } } public static final class f extends o implements kh4.a<Boolean> { /* renamed from: d reason: collision with root package name */ public static final f f119053d = new f(); public f() { super(0); } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public Boolean invoke() { boolean z15; long nanoTime = System.nanoTime(); if (x4.x() || x4.P() || x4.z()) { z15 = true; } else { z15 = false; } if (BuildInfo.DEBUG) { Log.i("FinderUIToolHelper", "[isFoldableDeviceOrInMagicWindowMode] cost=" + (System.nanoTime() - nanoTime) + "ns"); } return Boolean.valueOf(z15); } } public static final class g implements y0.j { /* renamed from: a reason: collision with root package name */ public static final g f119054a = new g(); @Override // i14.y0.j public final void a(View view) { TextView textView; if (view != null && (textView = (TextView) view.findViewById(R.id.f364839oe3)) != null) { textView.setTextSize(1, 14.0f); } } } public static final class h extends o implements kh4.a<Integer> { /* renamed from: d reason: collision with root package name */ public static final h f119055d = new h(); public h() { super(0); } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public Integer invoke() { return Integer.valueOf(l5.f(MMApplicationContext.getContext())); } } public static final class i extends o implements kh4.a<Integer> { /* renamed from: d reason: collision with root package name */ public static final i f119056d = new i(); public i() { super(0); } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public Integer invoke() { h4.f119006a.getClass(); return Integer.valueOf(((Number) ((n) h4.f119019n).getValue()).intValue() + l5.a(MMApplicationContext.getContext())); } } static { MMApplicationContext.getContext().getResources().getDimension(R.dimen.f359061c9); long j15 = ((long) 60) * 60000; f119012g = j15; long j16 = ((long) 24) * j15; f119013h = j16; f119014i = ((long) 7) * j16; f119015j = ((long) 30) * j16; f119016k = ((long) 365) * j16; boolean z15 = BuildInfo.DEBUG; zz1.e.f356376d.getClass(); MMApplicationContext.getContext().getResources().getDimensionPixelOffset(R.dimen.f359119dv); } /* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: com.tencent.mm.plugin.finder.utils.h4 */ /* JADX WARN: Multi-variable type inference failed */ public static /* synthetic */ d1 A1(h4 h4Var, Intent intent, RecyclerView recyclerView, BaseFeedLoader baseFeedLoader, boolean z15, l lVar, int i15, Object obj) { if ((i15 & 8) != 0) { z15 = true; } if ((i15 & 16) != 0) { lVar = null; } return h4Var.z1(intent, recyclerView, baseFeedLoader, z15, lVar); } /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.tencent.mm.plugin.finder.utils.h4 */ /* JADX WARN: Multi-variable type inference failed */ public static d1 B1(h4 h4Var, Intent intent, RecyclerView recyclerView, BaseFeedLoader baseFeedLoader, boolean z15, l lVar, int i15, Object obj) { if ((i15 & 8) != 0) { z15 = true; } if ((i15 & 16) != 0) { lVar = null; } h4Var.getClass(); m.g(intent, "data"); m.g(recyclerView, "recyclerView"); m.g(baseFeedLoader, "feedLoader"); RecyclerView.e adapter = recyclerView.getAdapter(); baseFeedLoader.initBackCache(intent); d1 backCache = baseFeedLoader.getBackCache(); if (backCache == null || Util.isNullOrNil(backCache.f111112a) || backCache.f111113b == null) { return null; } DataBuffer dataList = baseFeedLoader.getDataList(); List<d3> V = h4Var.V(dataList, 0, lVar); if (V.size() != backCache.f111112a.size()) { Iterator<T> it = V.iterator(); while (it.hasNext()) { dataList.remove(it.next()); } dataList.addAll(backCache.f111112a); if (z15) { baseFeedLoader.setLastBuffer(backCache.f111113b); } if (adapter != null) { adapter.notifyDataSetChanged(); } } return backCache; } public static String L(h4 h4Var, int i15, boolean z15, boolean z16, int i16, Object obj) { h4Var.getClass(); return ((x2) j.c(x2.class)).ip0((long) i15); } public static /* synthetic */ void N1(h4 h4Var, int i15, List list, xv3.b bVar, Intent intent, com.tencent.mm.plugin.finder.feed.model.d dVar, int i16, Object obj) { if ((i16 & 16) != 0) { dVar = null; } h4Var.M1(i15, list, bVar, intent, dVar); } /* JADX DEBUG: Multi-variable search result rejected for r10v11, resolved type: com.tencent.mm.plugin.finder.utils.p1 */ /* JADX WARN: Multi-variable type inference failed */ public static a Q(h4 h4Var, Context context, BaseFinderFeed baseFinderFeed, int i15, l lVar, l lVar2, int i16, Object obj) { l lVar3; boolean z15; String str; String str2; String str3; String str4; boolean z16; boolean z17; boolean z18; boolean z19; boolean z25; boolean z26; boolean z27; boolean z28; boolean z29; l lVar4 = null; if ((i16 & 8) != 0) { lVar3 = null; } else { lVar3 = lVar; } if ((i16 & 16) == 0) { lVar4 = lVar2; } h4Var.getClass(); m.g(context, "context"); m.g(baseFinderFeed, "feed"); String string = context.getString(R.string.f367611yh); m.f(string, "context.getString(com.te…ring.app_share_to_weixin)"); String string2 = context.getString(R.string.f368553f54); m.f(string2, "context.getString(com.te…ng.finder_share_timeline)"); String string3 = context.getString(R.string.c__); m.f(string3, "context.getString(com.te…ibmmui.R.string.favorite)"); String string4 = context.getString(R.string.iez); m.f(string4, "context.getString(com.te…sation_forward_to_wework)"); Log.i(f119007b, "getActionMenuInfo lxl object Status: " + baseFinderFeed.t().getFeedObject().objectStatus + " isOnlySelfSee=" + baseFinderFeed.t().isOnlySelfSee() + " isSelf=" + h4Var.c1(baseFinderFeed) + " objectStatus:" + baseFinderFeed.t().getFeedObject().objectDesc); if (lVar3 != null && baseFinderFeed.t().isOnlySelfSee() && h4Var.c1(baseFinderFeed)) { p1.f119222a.b(context, baseFinderFeed, 2, lVar3); } boolean isNotShareSns = baseFinderFeed.t().isNotShareSns(); boolean isNotShareConversation = baseFinderFeed.t().isNotShareConversation(); if (!h4Var.f(baseFinderFeed.t().getFeedObject()) || baseFinderFeed.t().isOnlySelfSee()) { z15 = true; } else { z15 = false; } String obj2 = d0.l0(baseFinderFeed.t().getNotShareMsg()).toString(); m.g(obj2, "tips"); List X = d0.X(obj2, new String[]{"#"}, false, 0, 6, null); String str5 = ""; if (X.size() >= 3) { String str6 = (String) c0.R(X, 0); if (str6 == null) { str6 = str5; } str = (String) c0.R(X, 1); if (str == null) { str = str5; } String str7 = (String) c0.R(X, 2); if (str7 != null) { str5 = str7; } str2 = str5; str5 = str6; } else { str2 = str5; str = str2; } if (Util.isNullOrNil(str5)) { str5 = f119006a.g0("FinderSafeSelfSeeForward", R.string.f3u); } if (Util.isNullOrNil(str)) { str = f119006a.g0("FinderSafeSelfSeeShare", R.string.f3v); } if (Util.isNullOrNil(str2) && (str2 = b02.j.f9757a.c("FinderObjectDynamicItemKey_FinderSelfSeeTipsFav")) == null) { str2 = f119006a.g0("FinderSafeSelfSeeCollect", R.string.f3t); } if (isNotShareConversation) { str3 = str5; } else { str5 = string; str3 = string4; } if (isNotShareSns) { string2 = str; } if (z15) { str4 = str2; } else { str4 = string3; } if (baseFinderFeed.t().getMediaType() == 9) { z16 = true; } else { z16 = false; } FinderObject feedObject = baseFinderFeed.t().getFeedObject(); m.g(feedObject, l3.COL_FINDEROBJECT); if ((feedObject.permissionFlag & 131072) > 0) { z17 = true; } else { z17 = false; } if (z17 || z16) { z18 = true; } else { z18 = false; } FinderObject feedObject2 = baseFinderFeed.t().getFeedObject(); m.g(feedObject2, l3.COL_FINDEROBJECT); if ((feedObject2.permissionFlag & 262144) > 0) { z19 = true; } else { z19 = false; } if (z19 || z16) { z25 = true; } else { z25 = false; } boolean L0 = h4Var.L0(baseFinderFeed.t().getFeedObject()); FinderObject feedObject3 = baseFinderFeed.t().getFeedObject(); m.g(feedObject3, l3.COL_FINDEROBJECT); if ((feedObject3.permissionFlag & 16384) > 0) { z26 = true; } else { z26 = false; } r91 r912 = feedObject3.liveInfo; if (r912 != null) { z27 = true; z28 = !h4Var.h(r912.f35024a1); } else { z27 = true; z28 = false; } if (z26 || z28) { z29 = z27; } else { z29 = false; } a aVar = new a(isNotShareConversation, isNotShareSns, z15, isNotShareConversation, str5, string2, str4, str3, L0, z29, z18, h4Var.M0(context, baseFinderFeed.t()), z25); if (lVar4 != null && !h4Var.M0(context, baseFinderFeed.t())) { hh2.n.a().Xd0(context, new p4(aVar, lVar4)); } return aVar; } public static void Q1(h4 h4Var, ImageView imageView, int i15, String str, int i16, int i17, Object obj) { if ((i17 & 8) != 0) { i16 = 1; } h4Var.getClass(); m.g(imageView, "view"); if (i15 > 0) { FinderAuthInfo finderAuthInfo = new FinderAuthInfo(); finderAuthInfo.authIconType = i15; finderAuthInfo.authIconUrl = str; b0 b0Var = b0.f332794a; R1(h4Var, imageView, finderAuthInfo, i16, null, 8, null); return; } imageView.setVisibility(8); } public static /* synthetic */ void R1(h4 h4Var, ImageView imageView, FinderAuthInfo finderAuthInfo, int i15, fh fhVar, int i16, Object obj) { if ((i16 & 4) != 0) { i15 = 1; } if ((i16 & 8) != 0) { fhVar = null; } h4Var.P1(imageView, finderAuthInfo, i15, fhVar); } public static /* synthetic */ String Z(h4 h4Var, String str, String str2, boolean z15, int i15, Object obj) { if ((i15 & 4) != 0) { z15 = false; } return h4Var.Y(str, str2, z15); } public static void a(h4 h4Var, Intent intent, int i15, String str, int i16, Object obj) { if ((i16 & 2) != 0) { i15 = 0; } String str2 = ""; if ((i16 & 4) != 0) { str = str2; } h4Var.getClass(); m.g(intent, "intent"); m.g(str, "enterExtraInfo"); if (i15 <= 0) { i15 = intent.getIntExtra("report_scene", 0); } if (!Util.isNullOrNil(str) || (str = intent.getStringExtra("key_extra_info")) != null) { str2 = str; } String stringExtra = intent.getStringExtra("KEY_SEARCH_WRORD"); try { JSONObject jSONObject = new JSONObject(); JSONObject jSONObject2 = new JSONObject(); if (stringExtra != null) { jSONObject2.put("search_word", stringExtra); } if (i15 > 0) { if (i15 == 1) { jSONObject2.put("from_user", intent.getStringExtra("from_user")); jSONObject2.put("wx_chat_id", intent.getStringExtra("key_from_user_name")); } else if (i15 == 2) { jSONObject2.put("from_user", intent.getStringExtra("from_user")); jSONObject2.put("roomid", intent.getStringExtra("key_to_user_name")); jSONObject2.put("wx_chat_id", intent.getStringExtra("key_from_user_name")); } else if (i15 == 3) { jSONObject2.put("from_user", intent.getStringExtra("from_user")); } else if (i15 == 11) { JSONObject jSONObject3 = new JSONObject(str2); jSONObject2.put("bizuin", jSONObject3.optString("bizuin")); jSONObject2.put("url", jSONObject3.optString("url")); } else if (i15 == 2000) { jSONObject2.put("export_url", intent.getStringExtra("KEY_SCAN_EXPORT_URL")); jSONObject2.put("scan_type", String.valueOf(intent.getIntExtra("KEY_SCAN_TYPE", 0))); } } try { jSONObject2.put("mini_prog_id", new JSONObject(str2).optJSONObject("weapp_info").optString("appid")); } catch (Exception unused) { Log.i(f119007b, "[addClientReportBuffInfo], mini_prog_id null"); } jSONObject.put("clientReportInfo", jSONObject2); intent.putExtra("key_common_extra_info", jSONObject.toString()); } catch (Exception e15) { Log.printErrStackTrace(f119007b, e15, "addClientReportBuffInfo", new Object[0]); } } public static final String a2(int i15) { int hashCode; DecimalFormat decimalFormat = new DecimalFormat("0.#"); decimalFormat.setRoundingMode(RoundingMode.FLOOR); String currentLanguage = LocaleUtil.getCurrentLanguage(MMApplicationContext.getContext()); if (currentLanguage == null || ((hashCode = currentLanguage.hashCode()) == 115861276 ? !currentLanguage.equals("zh_CN") : hashCode == 115861428 ? !currentLanguage.equals("zh_HK") : !(hashCode == 115861812 && currentLanguage.equals("zh_TW")))) { return decimalFormat.format(Float.valueOf(((float) i15) / ((float) 1000))) + MMApplicationContext.getContext().getString(R.string.f7y); } return decimalFormat.format(Float.valueOf(((float) i15) / ((float) 10000))) + MMApplicationContext.getContext().getString(R.string.f7x); } /* JADX WARNING: Code restructure failed: missing block: B:55:0x00c0, code lost: if (r13 != false) goto L_0x00c5; */ /* JADX WARNING: Code restructure failed: missing block: B:90:0x013f, code lost: if (r15 != false) goto L_0x0144; */ /* JADX WARNING: Removed duplicated region for block: B:127:0x0086 A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:131:0x0105 A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:59:0x00c8 */ /* JADX WARNING: Removed duplicated region for block: B:94:0x0147 */ public static List h0(h4 h4Var, int i15, bv1 bv12, int i16, boolean z15, boolean z16, boolean z17, int i17, int i18, Object obj) { boolean z18; boolean z19; g.d dVar; boolean z25; boolean z26; d3 d3Var = null; if ((i18 & 2) != 0) { bv12 = null; } if ((i18 & 4) != 0) { i16 = 0; } if ((i18 & 8) != 0) { z15 = false; } if ((i18 & 16) != 0) { z16 = false; } if ((i18 & 32) != 0) { z17 = false; } if ((i18 & 64) != 0) { i17 = 0; } h4Var.getClass(); LinkedList linkedList = new LinkedList(); j0 a15 = r.f342954a.e(FinderCommonFeatureService.class).a(a32.g.class); m.f(a15, "UICProvider.of(FinderCom…meTabStateVM::class.java)"); a32.g gVar = (a32.g) a15; q4 q4Var = new q4(i16, bv12); if (i17 != 0) { Iterator<g.d> it = gVar.j5(i15).f860n.iterator(); while (true) { if (!it.hasNext()) { dVar = null; break; } dVar = it.next(); if (dVar.f871a.f16730d == i17) { z26 = true; continue; } else { z26 = false; continue; } if (z26) { break; } } g.d dVar2 = dVar; g.a aVar = dVar2 != null ? dVar2.f872b : null; if (aVar != null) { ArrayList<d3> arrayList = aVar.f849c; ArrayList arrayList2 = new ArrayList(); for (T t15 : arrayList) { T t16 = t15; if (!(t16.m() == 2011 || t16.m() == 2010 || t16.m() == 2013 || t16.m() == 2014)) { if (z16) { T t17 = t16 instanceof BaseFinderFeed ? t16 : null; } z25 = false; if (z25) { arrayList2.add(t15); } } z25 = true; if (z25) { } } linkedList.addAll(arrayList2); } else if (i17 != 101 && !z15) { linkedList.addAll((Collection) q4Var.invoke()); } } else { g.a j55 = gVar.j5(i15); if (!j55.f849c.isEmpty() || z15) { ArrayList<d3> arrayList3 = j55.f849c; ArrayList arrayList4 = new ArrayList(); for (T t18 : arrayList3) { T t19 = t18; if (!(t19.m() == 2011 || t19.m() == 2010 || t19.m() == 2013 || t19.m() == 2014)) { if (z16) { T t25 = t19 instanceof BaseFinderFeed ? t19 : null; } z19 = false; if (z19) { arrayList4.add(t18); } } z19 = true; if (z19) { } } linkedList.addAll(arrayList4); } else { linkedList.addAll((Collection) q4Var.invoke()); } if (z17 && j55.f853g != 0) { Iterator it4 = linkedList.iterator(); while (true) { if (!it4.hasNext()) { break; } Object next = it4.next(); if (((d3) next).getItemId() == j55.f853g) { z18 = true; continue; } else { z18 = false; continue; } if (z18) { d3Var = next; break; } } d3 d3Var2 = d3Var; if (d3Var2 != null) { linkedList.remove(d3Var2); linkedList.addFirst(d3Var2); } } } ArrayList arrayList5 = new ArrayList(); for (Object obj2 : linkedList) { d3 d3Var3 = (d3) obj2; if (d3Var3 instanceof BaseFinderFeed ? f119006a.P0(((BaseFinderFeed) d3Var3).t().getFeedObject()) : true) { arrayList5.add(obj2); } } return arrayList5; } public static /* synthetic */ Integer k0(h4 h4Var, int i15, boolean z15, int i16, Object obj) { if ((i16 & 2) != 0) { z15 = false; } return h4Var.j0(i15, z15); } public static boolean o(h4 h4Var, Activity activity, String str, String str2, u5.a aVar, int i15, Object obj) { String str3; u5.a aVar2 = null; if ((i15 & 4) != 0) { str3 = null; } else { str3 = str2; } if ((i15 & 8) == 0) { aVar2 = aVar; } h4Var.getClass(); m.g(activity, EnvConsts.ACTIVITY_MANAGER_SRVNAME); int i16 = dj1.b.f200487e.O5().c().f44101x; Log.i(f119007b, "check has realname userFlag %d", Integer.valueOf(i16)); if ((i16 & 1) == 0) { return true; } com.tencent.mm.plugin.report.service.q.INSTANCE.v(1279, 35, 1); String string = activity.getString(R.string.f3k); m.f(string, "activity.getString(R.str…lf_contact_need_realname)"); if (!Util.isNullOrNil(str)) { string = String.valueOf(str); } String string2 = activity.getString(R.string.cno); m.f(string2, "activity.getString(R.str…er_check_real_name_title)"); if (!Util.isNullOrNil(str3)) { string2 = String.valueOf(str3); } x.f119440a.a(activity, string2, string, activity.getString(R.string.f3l), activity.getString(R.string.f367394sg), new l4(activity, aVar2), new m4(aVar2), null); return false; } public static /* synthetic */ int s(h4 h4Var, Context context, String str, int i15, Object obj) { if ((i15 & 2) != 0) { str = ""; } return h4Var.r(context, str); } public static /* synthetic */ m0 x1(h4 h4Var, Context context, String str, Intent intent, int i15, l lVar, int i16, Object obj) { return h4Var.u1(context, str, (i16 & 4) != 0 ? null : intent, i15, (i16 & 16) != 0 ? null : lVar); } public final boolean A(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 524288) > 0; } public final String A0(Context context, int i15, FinderObject finderObject) { String str; if (lm1.a.a(finderObject)) { if (finderObject == null || (str = finderObject.username) == null) { return ""; } return str; } else if (i15 != 2) { return dj1.b.f200487e.b6(); } else { String r15 = u0.r(); m.f(r15, "{\n ConfigStor…eFromUserInfo()\n }"); return r15; } } public final boolean B(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 65536) > 0; } public final int B0(int i15) { if (i15 == 1) { return 2; } if (i15 == 2) { return 3; } if (i15 == 3) { return 4; } if (i15 == 11) { return 5; } if (i15 == 18) { return 15; } switch (i15) { case 14: return 6; case 15: return 7; case 16: return 9; default: return -1; } } public final boolean C(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 32768) > 0; } public final String C0() { String c15 = b02.j.f9757a.c("FinderObjectDynamicItemKey_FinderFav"); if (c15 != null) { return c15; } String string = MMApplicationContext.getContext().getString(R.string.f5u); m.f(string, "getContext().getString(R…ng.finder_star_icon_text)"); return string; } public final CharSequence C1(Context context, CharSequence charSequence, char c15, int i15, int i16, int i17, int i18) { m.g(context, "context"); m.g(charSequence, "str"); SpannableString spannableString = new SpannableString(charSequence); int G = d0.G(charSequence, c15, 0, false, 6, null); int color = context.getResources().getColor(i16); if (G >= 0) { Drawable d15 = h5.d(context, i15, color); d15.setBounds(0, 0, i17, i18); spannableString.setSpan(new f64.d(d15, 1), G, G + 1, 33); } return spannableString; } public final boolean D(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 4194304) > 0; } public final int D0() { return ((Number) ((n) f119020o).getValue()).intValue(); } public final CharSequence D1(Context context, CharSequence charSequence, char c15, Drawable drawable, int i15, int i16, int i17) { m.g(context, "context"); m.g(charSequence, "str"); m.g(drawable, "drawable"); SpannableString spannableString = new SpannableString(charSequence); int G = d0.G(charSequence, c15, 0, false, 6, null); int color = context.getResources().getColor(i15); if (G >= 0) { h5.e(drawable, color); drawable.setBounds(0, 0, i16, i16); spannableString.setSpan(new f64.d(drawable, 1), G, G + 1, 33); } return spannableString; } public final String E(String str) { m.g(str, FirebaseAnalytics.b.ORIGIN); return a5.f118672a.l(str); } public final List<BaseFinderFeed> E0(List<? extends BaseFinderFeed> list, int i15) { m.g(list, "cacheDataList"); ArrayList arrayList = new ArrayList(); j0 a15 = r.f342954a.e(FinderCommonFeatureService.class).a(a32.r.class); m.f(a15, "UICProvider.of(FinderCom…reamUnreadVM::class.java)"); a32.r rVar = (a32.r) a15; int i16 = 0; for (T t15 : list) { int i17 = i16 + 1; if (i16 >= 0) { T t16 = t15; if (i16 >= 2) { if (a02.f.f299a.j(i15, t16.t().field_id)) { break; } else if (t16.t().field_id != 0 && !rVar.l5(i15, t16.t().field_id)) { arrayList.add(t16); } } i16 = i17; } else { u.l(); throw null; } } return arrayList; } public final FinderJumpInfo E1(String str) { m.g(str, "accountJumpInfoStr"); if (Util.isNullOrNil(str)) { return null; } byte[] decode = Base64.decode(str, 2); try { FinderJumpInfo create = FinderJumpInfo.create(); create.parseFrom(decode); return create; } catch (IOException e15) { Log.e(f119007b, "parse accountJumpInfo failed: %s", e15); return null; } } /* JADX WARNING: Removed duplicated region for block: B:105:0x0211 */ /* JADX WARNING: Removed duplicated region for block: B:138:0x02ab */ /* JADX WARNING: Removed duplicated region for block: B:141:0x02b3 A[LOOP:2: B:42:0x00e8->B:141:0x02b3, LOOP_END] */ /* JADX WARNING: Removed duplicated region for block: B:153:0x02c3 A[EDGE_INSN: B:153:0x02c3->B:143:0x02c3 ?: BREAK , SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:98:0x01fd */ public final m F(RecyclerView recyclerView, int i15, int i16, Set<Integer> set) { int i17; int i18; long j15; LinkedList linkedList; i84.o oVar; int i19; boolean z15; int i25; LinkedList linkedList2; d3 d3Var; FeedData feedData; View view; int i26; LinkedList<y53> linkedList3; b0 b0Var; LinkedList<y53> mediaList; String str; boolean z16; boolean z17; boolean z18; RecyclerView recyclerView2 = recyclerView; Set<Integer> set2 = set; m.g(recyclerView2, "recyclerView"); m.g(set2, "otherCareType"); long uptimeMillis = SystemClock.uptimeMillis(); RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); m.e(layoutManager, "null cannot be cast to non-null type androidx.recyclerview.widget.LinearLayoutManager"); LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager; int i27 = i15; if (i27 == Integer.MIN_VALUE) { i27 = linearLayoutManager.C(); } if (i16 == Integer.MIN_VALUE) { i17 = linearLayoutManager.E(); } else { i17 = i16; } if (i27 < 0 || i17 < i27 || i17 < 0) { return new m(false, 0, null, null, 0, 0, null, null, 254, null); } LinkedList linkedList4 = new LinkedList(); RecyclerView.e adapter = recyclerView.getAdapter(); m.e(adapter, "null cannot be cast to non-null type com.tencent.mm.view.recyclerview.WxRecyclerAdapter<*>"); WxRecyclerAdapter wxRecyclerAdapter = (WxRecyclerAdapter) adapter; Iterator it = wxRecyclerAdapter.getData().iterator(); int i28 = 0; while (true) { if (!it.hasNext()) { i28 = -1; break; } i84.c cVar = (i84.c) it.next(); if (cVar.m() == 4 || cVar.m() == 2013 || cVar.m() == 9) { z18 = true; } else { z18 = false; } if (z18) { break; } i28++; } int n65 = i28 + wxRecyclerAdapter.n6(); Iterator it4 = wxRecyclerAdapter.getData().iterator(); int i29 = 0; while (true) { if (!it4.hasNext()) { i18 = -1; break; } i84.c cVar2 = (i84.c) it4.next(); if (cVar2.m() == 4 || cVar2.m() == 2 || cVar2.m() == 9) { z17 = true; } else { z17 = false; } if (z17) { i18 = i29; break; } i29++; } int n66 = i18 + wxRecyclerAdapter.n6(); int i35 = f119023r; float f15 = ((float) i35) * 0.4f; int i36 = Integer.MAX_VALUE; m mVar = new m(false, 0, null, null, 0, 0, null, null, 255, null); if (i27 <= i17) { boolean z19 = false; while (true) { RecyclerView.z M0 = recyclerView2.M0(i27, z19); String str2 = null; if (M0 instanceof i84.o) { oVar = (i84.o) M0; } else { oVar = null; } if (oVar != null) { Object obj = oVar.E; if (obj instanceof d3) { d3Var = (d3) obj; } else { d3Var = null; } if (d3Var != null) { int m15 = d3Var.m(); boolean z25 = d3Var instanceof BaseFinderFeed; j15 = uptimeMillis; if (z25 || set2.contains(Integer.valueOf(m15))) { if (z25) { feedData = FeedData.Companion.a((BaseFinderFeed) d3Var); i19 = i17; linkedList2 = linkedList4; } else if (d3Var instanceof w9) { w9 w9Var = (w9) d3Var; FeedData feedData2 = new FeedData(); i19 = i17; linkedList2 = linkedList4; feedData2.setFeedId(w9Var.f296403d.f29063u); feedData2.setMediaType(w9Var.m()); feedData2.setRvFeedList(w9Var.f296405f); feedData = feedData2; } else { i19 = i17; linkedList2 = linkedList4; feedData = null; } if (!z25 || (d3Var instanceof k0)) { view = oVar.f7101d; } else { view = (FinderBaseMediaBanner) oVar.D(R.id.f363358fs3); if (view == null) { view = oVar.D(R.id.iqf); } } if (view == null) { Log.w(f119007b, "findCenterFeed: mediaView is null, index=" + i27 + ", feedId=" + m60.d.p(d3Var.getItemId())); } else { Rect rect = f119017l; rect.setEmpty(); if (!view.getGlobalVisibleRect(rect)) { Objects.toString(rect); } else { rect.top = y2.a.b(rect.top, 0, i35); rect.bottom = y2.a.b(rect.bottom, 0, i35); if (rect.height() <= 0) { Objects.toString(rect); } else { if (i27 == n65 && n66 == n65) { i26 = 0; } else { i26 = (int) Math.abs(f15 - ((float) rect.top)); } if (m15 != 4 && m15 != 2013) { if (m15 == 2) { if (feedData != null) { if (feedData.getHasBgmInfo()) { z16 = true; if (!z16) { } } } z16 = false; if (!z16) { } } if (i26 >= i36) { mVar.f119150e = d3Var.m(); mVar.f119151f = i27; mVar.f119152g = oVar; i25 = i27; mVar.f119147b = d3Var.getItemId(); mVar.f119149d = feedData; mVar.f119153h = d3Var; View D = oVar.D(R.id.f363358fs3); if (feedData != null) { linkedList3 = feedData.getMediaList(); } else { linkedList3 = null; } a5 a5Var = a5.f118672a; String str3 = ""; if (D == null || linkedList3 == null) { b0Var = null; } else { FinderBaseMediaBanner finderBaseMediaBanner = (FinderBaseMediaBanner) D; if (finderBaseMediaBanner.getFocusPosition() >= 0 && finderBaseMediaBanner.getFocusPosition() < linkedList3.size()) { y53 y532 = (y53) c0.R(linkedList3, finderBaseMediaBanner.getFocusPosition()); if (y532 != null) { str = y532.f42978p; } else { str = null; } if (str == null) { str = str3; } mVar.f119148c = str; } b0Var = b0.f332794a; } if (b0Var == null) { if (feedData == null || (mediaList = feedData.getMediaList()) == null) { z15 = false; } else { z15 = false; y53 y533 = (y53) c0.R(mediaList, 0); if (y533 != null) { str2 = y533.f42978p; } } if (str2 != null) { str3 = str2; } mVar.f119148c = str3; } else { z15 = false; } linkedList = linkedList2; linkedList.add(m.a(mVar, false, 0, null, null, 0, 0, null, null, 255, null)); i36 = i26; } else { i25 = i27; linkedList = linkedList2; z15 = false; } i17 = i19; if (i25 == i17) { break; } i27 = i25 + 1; recyclerView2 = recyclerView; set2 = set; z19 = z15; linkedList4 = linkedList; uptimeMillis = j15; } if (rect.height() > view.getHeight() / 2) { i26 -= i35; } if (i26 >= i36) { } i17 = i19; if (i25 == i17) { } } } } i25 = i27; linkedList = linkedList2; z15 = false; i17 = i19; if (i25 == i17) { } } i19 = i17; linkedList2 = linkedList4; i25 = i27; linkedList = linkedList2; z15 = false; i17 = i19; if (i25 == i17) { } } } j15 = uptimeMillis; i19 = i17; linkedList2 = linkedList4; i25 = i27; linkedList = linkedList2; z15 = false; i17 = i19; if (i25 == i17) { } } } else { j15 = uptimeMillis; linkedList = linkedList4; } mVar.f119154i.addAll(linkedList); if (f119018m != mVar.f119147b) { Log.i(f119007b, "[findCenterFeed] cost=" + (SystemClock.uptimeMillis() - j15) + "ms firstFeedIndex=" + n66 + " firstVideoFeedIndex=" + n65 + ", centerResult=[" + mVar + ']'); f119018m = mVar.f119147b; } return mVar; } public final com.tencent.mm.plugin.sight.base.a F0(String str) { m.g(str, AssistantStore.DownloadInfos.DownloadInfoColumns.FILEPATH); if (Util.isNullOrNil(str)) { return null; } com.tencent.mm.plugin.sight.base.a Td0 = ((com.tencent.mm.feature.sight.api.f) j.c(com.tencent.mm.feature.sight.api.f.class)).Td0(str, true); if (Td0 == null) { Td0 = new com.tencent.mm.plugin.sight.base.a(); } if (Td0.f146161d <= 0 || Td0.f146160c <= 0) { try { MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever(); mediaMetadataRetriever.setDataSource(u1.i(str, false)); Td0.f146160c = Util.getInt(mediaMetadataRetriever.extractMetadata(18), 0); Td0.f146161d = Util.getInt(mediaMetadataRetriever.extractMetadata(19), 0); Td0.f146159b = Util.getInt(mediaMetadataRetriever.extractMetadata(20), 0); Td0.f146158a = Util.getInt(mediaMetadataRetriever.extractMetadata(9), 0); mediaMetadataRetriever.release(); } catch (Exception unused) { } } int mp4RotateVFS = ((ISightJNIService) j.c(ISightJNIService.class)).getMp4RotateVFS(str); Log.i(f119007b, "width %d, height %d, rotate %d", Integer.valueOf(Td0.f146160c), Integer.valueOf(Td0.f146161d), Integer.valueOf(mp4RotateVFS)); if (mp4RotateVFS == 90 || mp4RotateVFS == 270) { int i15 = Td0.f146161d; Td0.f146161d = Td0.f146160c; Td0.f146160c = i15; } return Td0; } public final void F1(FinderItem finderItem) { m.g(finderItem, LocaleUtil.ITALIAN); FinderExposeInfoChangeEvent finderExposeInfoChangeEvent = new FinderExposeInfoChangeEvent(); FinderExposeInfoChangeEvent.a aVar = finderExposeInfoChangeEvent.f62821d; aVar.f62822a = finderItem.field_id; aVar.f62824c = finderItem.getCommentCount(); finderExposeInfoChangeEvent.publish(); } public final int G(RecyclerView recyclerView, boolean z15, int i15, int i16) { View view; if (!z15) { return i15; } Rect rect = new Rect(); int i17 = 0; RecyclerView.z M0 = recyclerView.M0(i15, false); if (M0 != null) { view = M0.f7101d; } else { view = null; } if (view != null) { view.getGlobalVisibleRect(rect); } int height = rect.height(); if (view != null) { i17 = view.getHeight(); } if (height >= i17 / 2) { return i15; } return G(recyclerView, z15, i15 + i16, i16); } public final wg4.l<Integer, Integer> G0(RecyclerView recyclerView, boolean z15) { int i15; int i16; i84.o oVar; View childAt; boolean z16; m.g(recyclerView, "recyclerView"); RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); if (layoutManager instanceof StaggeredGridLayoutManager) { StaggeredGridLayoutManager staggeredGridLayoutManager = (StaggeredGridLayoutManager) layoutManager; Integer U = xg4.o.U(staggeredGridLayoutManager.A(null)); if (U != null) { i15 = U.intValue(); } else { i15 = 0; } Integer T = xg4.o.T(staggeredGridLayoutManager.B(null)); if (T != null) { i16 = T.intValue(); } else { i16 = 0; } } else if (!(layoutManager instanceof LinearLayoutManager)) { return new wg4.l<>(-1, -1); } else { LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager; i15 = linearLayoutManager.C(); i16 = linearLayoutManager.E(); } int G = G(recyclerView, z15, i15, 1); int G2 = G(recyclerView, z15, i16, -1); Rect rect = new Rect(); if (i15 <= i16) { int i17 = i15; while (true) { RecyclerView.z L0 = recyclerView.L0(i17); if (L0 instanceof i84.o) { oVar = (i84.o) L0; } else { oVar = null; } if (!(oVar == null || (childAt = layoutManager.getChildAt(i17)) == null)) { if (!childAt.isShown() || childAt.getAlpha() <= 0.0f || !childAt.getGlobalVisibleRect(rect)) { z16 = false; } else { z16 = true; } if (!(oVar.E instanceof BaseFinderFeed) || !z16) { if (i17 == i15) { G++; } else { G2--; } } } if (i17 == i16) { break; } i17++; } } return new wg4.l<>(Integer.valueOf(G), Integer.valueOf(G2)); } public final void G1(LinkedList<FinderCommentInfo> linkedList, long j15, long j16, String str) { boolean z15; m.g(linkedList, "commentList"); m.g(str, ClientInfoTable.Columns.CLIENTID); int i15 = -1; int i16 = 0; if (j16 != 0) { Iterator<FinderCommentInfo> it = linkedList.iterator(); int i17 = 0; while (true) { if (!it.hasNext()) { break; } if (it.next().commentId == j16) { z15 = true; } else { z15 = false; } if (z15) { i15 = i17; break; } i17++; } } else { Iterator<FinderCommentInfo> it4 = linkedList.iterator(); while (true) { if (!it4.hasNext()) { break; } else if (m.b(it4.next().client_id, str)) { i15 = i16; break; } else { i16++; } } } if (i15 >= 0) { linkedList.remove(i15); Log.i(f119007b, "update expose commentList, remove at " + i15); FinderExposeInfoChangeEvent finderExposeInfoChangeEvent = new FinderExposeInfoChangeEvent(); FinderExposeInfoChangeEvent.a aVar = finderExposeInfoChangeEvent.f62821d; aVar.f62822a = j15; hq1 hq12 = new hq1(); hq12.f24040d = linkedList; aVar.f62823b = hq12; finderExposeInfoChangeEvent.publish(); } } public final int H(RecyclerView recyclerView, boolean z15, int i15, int i16) { int i17; View view; if (i15 < 0) { return i15; } RecyclerView.e adapter = recyclerView.getAdapter(); boolean z16 = false; if (adapter != null) { i17 = adapter.getItemCount(); } else { i17 = 0; } if (i15 >= i17 || !z15) { return i15; } Rect rect = new Rect(); RecyclerView.z M0 = recyclerView.M0(i15, false); if (M0 != null) { view = M0.f7101d; } else { view = null; } if (view != null && view.getGlobalVisibleRect(rect)) { z16 = true; } if (!z16 || rect.height() < view.getHeight() / 2) { return H(recyclerView, z15, i15 + i16, i16); } return i15; } public final String H0(String str, String str2, boolean z15) { String str3; z1 z1Var = ((jh2.k0) z.q(jh2.k0.class)).Zx().get(str); String str4 = ""; if (z1Var != null && ((int) z1Var.V1) != 0 && !Util.isNullOrNil(z1Var.f())) { str4 = z1Var.f(); } else if (Util.isNullOrNil(str2)) { if (z1Var != null) { str3 = z1Var.getUsername(); } else { str3 = null; } if (str3 != null) { str4 = str3; } } else if (str2 != null) { str4 = str2; } if (z15) { String str5 = f119007b; Log.i(str5, "getDisplayName username " + str + " nickname " + str2 + " displayName:" + str4); } m.f(str4, "displayName"); return str4; } public final void H1(List<? extends FinderItem> list, String str) { String str2; m.g(list, "list"); m.g(str, "tag"); list.size(); int i15 = 0; for (T t15 : list) { Integer valueOf = Integer.valueOf(t15.getCreateTime()); String str3 = f119007b; StringBuilder sb5 = new StringBuilder(); sb5.append('#'); sb5.append(i15); sb5.append(" print item id:"); sb5.append(t15.getId()); sb5.append(" rowid:"); sb5.append(t15.getLocalId()); sb5.append(" time: "); sb5.append(valueOf); sb5.append(" sourceFlag:"); sb5.append(t15.field_sourceFlag); sb5.append(" username:"); FinderObject finderObject = t15.getFinderObject(); if (finderObject != null) { str2 = finderObject.username; } else { str2 = null; } sb5.append(str2); Log.i(str3, sb5.toString()); i15++; } } public final String I(long j15, Context context, int i15) { String str; String str2; m.g(context, "context"); Calendar instance = Calendar.getInstance(); instance.setTime(new Date(j15)); int i16 = instance.get(11); if (i16 < 10) { StringBuilder sb5 = new StringBuilder(); sb5.append('0'); sb5.append(i16); str = sb5.toString(); } else { str = String.valueOf(i16); } int i17 = instance.get(12); if (i17 < 10) { StringBuilder sb6 = new StringBuilder(); sb6.append('0'); sb6.append(i17); str2 = sb6.toString(); } else { str2 = String.valueOf(i17); } String string = context.getResources().getString(i15, Integer.valueOf(instance.get(1)), Integer.valueOf(instance.get(2) + 1), Integer.valueOf(instance.get(5)), str, str2); m.f(string, "context.resources.getStr… minuteStr\n )"); return string; } public final int I0() { return ((ie1.h) j.c(ie1.h.class)).Xj0(h.c.EA, 0); } /* JADX WARNING: Code restructure failed: missing block: B:24:0x0094, code lost: if (lh4.m.b(r3, r9.f33535g) == false) goto L_0x0096; */ public final void I1(px0 px02, Boolean bool, String str) { boolean z15; boolean z16; m.g(px02, "aliasInfo"); m.g(str, "source"); try { t1 i15 = z.s().i(); w1.a aVar = w1.a.f175181bh; String J = i15.J(aVar, ""); String str2 = f119007b; Log.i(str2, "[processFinderAliasSync] source:" + str + ", status:" + px02.f33537i + " , userName:" + px02.f33535g + " , avatar:" + px02.f33533e + " , currentAliasUserName:" + J); int i16 = px02.f33537i; if (i16 == 0 || i16 == 1) { String str3 = px02.f33535g; if (str3 != null) { if (str3.length() == 0) { z15 = true; } else { z15 = false; } if (!z15) { m.f(J, "currentAliasUserName"); if (J.length() > 0) { z16 = true; } else { z16 = false; } if (z16) { } } Log.i(str2, "processFinderAliasSync ask to change alias info,but alias_msg_name is not legal, alias_msg_name:" + px02.f33535g + ",currentAlias:" + J); return; } q qVar = new q(); String str4 = px02.f33532d; if (str4 == null) { str4 = ""; } qVar.field_nickname = str4; String str5 = px02.f33533e; if (str5 == null) { str5 = ""; } qVar.field_avatarUrl = str5; Boolean bool2 = Boolean.TRUE; if (m.b(bool, bool2)) { String str6 = px02.f33535g; if (str6 == null) { str6 = ""; } qVar.field_username = str6; } ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).jO0().a4(qVar, true); t1 i17 = z.s().i(); w1.a aVar2 = w1.a.f175206ch; String str7 = px02.f33532d; if (str7 == null) { str7 = ""; } i17.L(aVar2, str7); t1 i18 = z.s().i(); w1.a aVar3 = w1.a.f175232dh; String str8 = px02.f33533e; if (str8 == null) { str8 = ""; } i18.L(aVar3, str8); if (m.b(bool, bool2)) { t1 i19 = z.s().i(); String str9 = px02.f33535g; if (str9 == null) { str9 = ""; } i19.L(aVar, str9); } } else if (i16 == 2 || i16 == 3) { y("processFinderAliasSync", null); } } catch (Exception e15) { Log.printDebugStack(f119007b, "", e15); } } public final String J(int i15) { int i16 = i15 % 60; int i17 = i15 / 60; int i18 = i17 % 60; int i19 = i17 / 60; if (i19 == 0) { return M(i18) + ':' + M(i16); } return M(i19) + ':' + M(i18) + ':' + M(i16); } public final boolean J0(FinderItem finderItem) { Object[] objArr; Object[] objArr2; Object[] objArr3; rp1 rp12; rp1 rp13; Object[] objArr4; Object[] objArr5; FinderObjectDesc finderObjectDesc; rp1 rp14; rp1 rp15; rp1 rp16; m.g(finderItem, "feed"); if (((q5) j.c(q5.class)).isTeenMode()) { return false; } FinderObject finderObject = finderItem.getFinderObject(); m.g(finderObject, l3.COL_FINDEROBJECT); if ((finderObject.permissionFlag & 8) == 0) { objArr = 1; } else { objArr = null; } if (objArr == null) { return false; } if (finderItem.isLongVideo()) { return true; } hu1 hu12 = dj1.b.f200487e.O5().b().E; if (hu12 == null || hu12.f24192d != 1) { objArr2 = null; } else { objArr2 = 1; } if (objArr2 != null) { return false; } rp1 rp17 = null; r4 = null; String str = null; if (finderItem.getMediaType() == 2) { FinderObjectDesc finderObjectDesc2 = finderItem.getFeedObject().objectDesc; if (finderObjectDesc2 != null) { rp13 = finderObjectDesc2.feedBgmInfo; } else { rp13 = null; } if (rp13 == null) { return false; } FinderObjectDesc finderObjectDesc3 = finderItem.getFeedObject().objectDesc; if (finderObjectDesc3 == null || (rp16 = finderObjectDesc3.feedBgmInfo) == null || rp16.f35575f != 0) { objArr4 = null; } else { objArr4 = 1; } if (objArr4 != null) { return false; } FinderObjectDesc finderObjectDesc4 = finderItem.getFeedObject().objectDesc; if (!(finderObjectDesc4 == null || (rp15 = finderObjectDesc4.feedBgmInfo) == null)) { str = rp15.f35574e; } if (str == null || str.length() == 0) { objArr5 = 1; } else { objArr5 = null; } if (objArr5 != null || (finderObjectDesc = finderItem.getFeedObject().objectDesc) == null || (rp14 = finderObjectDesc.feedBgmInfo) == null || rp14.f35573d == null) { return false; } } else if (finderItem.getMediaType() != 4) { return false; } else { FinderObjectDesc finderObjectDesc5 = finderItem.getFeedObject().objectDesc; if (finderObjectDesc5 != null) { rp17 = finderObjectDesc5.feedBgmInfo; } if (rp17 != null) { FinderObjectDesc finderObjectDesc6 = finderItem.getFeedObject().objectDesc; if (finderObjectDesc6 == null || (rp12 = finderObjectDesc6.feedBgmInfo) == null || rp12.f35575f != 1) { objArr3 = null; } else { objArr3 = 1; } if (objArr3 == null) { return false; } } } return true; } public final String J1(String str, String str2) { m.g(str, "url"); m.g(str2, "name"); String str3 = "&?" + str2 + "=[^&]*"; m.g(str3, "pattern"); Pattern compile = Pattern.compile(str3); m.f(compile, "compile(pattern)"); String replaceAll = compile.matcher(str).replaceAll(""); m.f(replaceAll, "nativePattern.matcher(in…).replaceAll(replacement)"); return replaceAll; } public final String K(int i15, int i16) { if (i15 <= i16) { return String.valueOf(i15); } StringBuilder sb5 = new StringBuilder(); sb5.append(i16); sb5.append('+'); return sb5.toString(); } public final boolean K0() { return a5.f118672a.J(); } public final int K1(int i15) { return i15 % 2 != 0 ? i15 - 1 : i15; } public final boolean L0(FinderObject finderObject) { boolean z15; boolean z16; int i15; m.g(finderObject, l3.COL_FINDEROBJECT); if ((finderObject.permissionFlag & 8192) > 0) { z15 = true; } else { z15 = false; } r91 r912 = finderObject.liveInfo; if (r912 != null) { if (r912 != null) { i15 = r912.f35024a1; } else { i15 = 0; } z16 = !h(i15); } else { z16 = false; } if (z15 || z16) { return true; } return false; } public final String L1(String str) { String mD5String = str != null ? MD5Util.getMD5String(str) : null; return mD5String == null ? "" : mD5String; } public final String M(int i15) { if (i15 >= 10) { return String.valueOf(i15); } StringBuilder sb5 = new StringBuilder(); sb5.append('0'); sb5.append(i15); return sb5.toString(); } public final boolean M0(Context context, FinderItem finderItem) { boolean z15; m.g(context, "context"); m.g(finderItem, "feedObject"); zz1.e.f356376d.getClass(); if (zz1.e.f356448i7.t().intValue() == 1) { if (finderItem.getMediaType() != 9 || (!((zr.n) j.c(zr.n.class)).m4(finderItem.getLiveInfo()) && !((jb4.i) j.c(jb4.i.class)).xc0(finderItem.getLiveInfo()))) { z15 = false; } else { z15 = true; } if (!z15) { return false; } } return true; } public final void M1(int i15, List<? extends d3> list, xv3.b bVar, Intent intent, com.tencent.mm.plugin.finder.feed.model.d dVar) { m.g(list, "feedList"); m.g(intent, "intent"); a5.f118672a.i0(i15, list, bVar, intent, dVar); } public final String N(Context context, long j15) { boolean z15; boolean z16; boolean z17; boolean z18; boolean z19; String str; m.g(context, "context"); if (j15 < 3600000) { return ""; } long currentTimeMillis = System.currentTimeMillis() - j15; long j16 = (long) 10; long j17 = f119011f; if (currentTimeMillis < j16 * j17) { String string = context.getString(R.string.f368543f34); m.f(string, "context.getString(R.stri…rch_time_format_just_now)"); return string; } long j18 = j16 * j17; long j19 = f119012g; if (currentTimeMillis >= j19 || j18 > currentTimeMillis) { z15 = false; } else { z15 = true; } if (z15) { String string2 = context.getString(R.string.f35, Long.valueOf(currentTimeMillis / j17)); m.f(string2, "context.getString(R.stri…nute, diffMills / MINUTE)"); return string2; } long j25 = f119013h; if (currentTimeMillis >= j25 || j19 > currentTimeMillis) { z16 = false; } else { z16 = true; } if (z16) { String string3 = context.getString(R.string.f368542f33, Long.valueOf(currentTimeMillis / j19)); m.f(string3, "context.getString(R.stri…t_hour, diffMills / HOUR)"); return string3; } long j26 = f119014i; if (currentTimeMillis >= j26 || j25 > currentTimeMillis) { z17 = false; } else { z17 = true; } if (z17) { long j27 = currentTimeMillis / j25; if (j27 == 1) { str = context.getString(R.string.f38); } else { str = context.getString(R.string.f368541f32, Long.valueOf(j27)); } m.f(str, "{\n val di… }\n }"); return str; } long j28 = f119015j; if (currentTimeMillis >= j28 || j26 > currentTimeMillis) { z18 = false; } else { z18 = true; } if (z18) { String string4 = context.getString(R.string.f37, Long.valueOf(currentTimeMillis / j26)); m.f(string4, "context.getString(R.stri…t_week, diffMills / WEEK)"); return string4; } if (currentTimeMillis >= f119016k || j28 > currentTimeMillis) { z19 = false; } else { z19 = true; } if (!z19) { return ""; } String string5 = context.getString(R.string.f36, Long.valueOf(currentTimeMillis / j28)); m.f(string5, "context.getString(R.stri…month, diffMills / MONTH)"); return string5; } public final void N0(ImageView imageView, int i15, String str, int i16) { h0.a aVar = h0.a.f315087z; j3 j3Var = j3.f357048e; boolean z15 = false; imageView.setVisibility(0); if (i15 <= 0) { imageView.setVisibility(8); } else if (i15 == 1) { if (str == null || str.length() == 0) { z15 = true; } if (!z15) { ((v0) r.f342954a.e(e2.class).c(v0.class)).C3().c(new q0(str, j3Var), imageView, ((v0) r.f342954a.e(e2.class).c(v0.class)).W(aVar)); } else if (i16 == 0) { imageView.setImageResource(R.raw.icons_filled_star_identify_sold); } else { imageView.setImageDrawable(h5.d(imageView.getContext(), R.raw.icons_filled_star_identify, gy3.a.d(imageView.getContext(), R.color.a0m))); } } else if (i15 == 2) { if (str == null || str.length() == 0) { z15 = true; } if (!z15) { ((v0) r.f342954a.e(e2.class).c(v0.class)).C3().c(new q0(str, j3Var), imageView, ((v0) r.f342954a.e(e2.class).c(v0.class)).W(aVar)); } else if (i16 == 0) { imageView.setImageResource(R.raw.icons_filled_star_identify_enterprise_sold); } else { imageView.setImageResource(R.raw.icons_filled_star_identify_enterprise); } } else if (i15 != 100) { imageView.setVisibility(8); } else { imageView.setVisibility(8); } } public final String O(List<? extends oj4> list) { String str; m.g(list, "descs"); StringBuffer stringBuffer = new StringBuffer(); int size = list.size(); for (int i15 = 0; i15 < size; i15++) { oj4 oj42 = (oj4) list.get(i15); if (!(oj42 == null || (str = oj42.f32041d) == null || m.b(str, ""))) { String str2 = oj42.f32041d; m.f(str2, "skt.string"); String lowerCase = str2.toLowerCase(); m.f(lowerCase, "this as java.lang.String).toLowerCase()"); if (!m.b(lowerCase, "null")) { stringBuffer.append(oj42.f32041d); if (i15 < list.size() - 1) { stringBuffer.append("·"); } } } } return stringBuffer.toString(); } public final boolean O0(FinderObject finderObject, String str) { int i15; Integer num; m.g(finderObject, "obj"); m.g(str, "invokeSource"); FinderObjectDesc finderObjectDesc = finderObject.objectDesc; if (finderObjectDesc != null) { i15 = finderObjectDesc.mediaType; } else { i15 = 0; } r91 r912 = finderObject.liveInfo; if (r912 != null) { num = Integer.valueOf(r912.f35031f); } else { num = null; } String str2 = f119007b; if (i15 != 9) { Log.w(str2, str + " isAcceptLiveObj return for invalid mediaType:" + i15); return false; } else if (num == null || num.intValue() != 2) { return true; } else { Log.w(str2, str + " isAcceptLiveObj return for invalid liveState:" + num); return false; } } public final void O1(s1.d dVar, int i15, String str) { m.g(dVar, "resp"); m.g(str, "tag"); Log.i(str, "saveConfigWhenEnterFinderStreamEnter: tabType=" + i15 + ", headWording=" + dVar.f40376f + ", endWording=" + dVar.f40377g + ", prefetch_last_feed_count=" + dVar.f40381n + ", flow_card_prefetch_last_feed_count=" + dVar.E); z.s().i().L(w1.a.Vi, dVar.f40376f); z.s().i().L(w1.a.Wi, dVar.f40377g); z.s().i().L(w1.a.f175158aj, Integer.valueOf(dVar.f40381n)); if (dVar.E > 0) { z.s().i().L(w1.a.f175183bj, Integer.valueOf(dVar.E)); } } public final Map<String, Object> P() { wg4.l[] lVarArr = new wg4.l[3]; String ud5 = ((ie1.i) j.c(ie1.i.class)).ud(); String str = ""; if (ud5 == null) { ud5 = str; } lVarArr[0] = new wg4.l("behaviour_session_id", ud5); String C = ((ar.h) j.c(ar.h.class)).C(); if (C == null) { C = str; } lVarArr[1] = new wg4.l("finder_context_id", C); String a15 = ((ar.h) j.c(ar.h.class)).a1(); if (a15 != null) { str = a15; } lVarArr[2] = new wg4.l("finder_tab_context_id", str); return r0.f(lVarArr); } public final boolean P0(FinderObject finderObject) { int i15; boolean z15; int i16; LinkedList<FinderMedia> linkedList; LinkedList<FinderMedia> linkedList2; FinderMedia finderMedia; LinkedList<FinderMedia> linkedList3; m.g(finderObject, "obj"); a5 a5Var = a5.f118672a; List<Integer> r15 = a5Var.r(); FinderObjectDesc finderObjectDesc = finderObject.objectDesc; if (finderObjectDesc != null) { i15 = finderObjectDesc.mediaType; } else { i15 = 0; } if (r15.contains(Integer.valueOf(i15))) { return true; } FinderObjectDesc finderObjectDesc2 = finderObject.objectDesc; if (finderObjectDesc2 == null || (linkedList3 = finderObjectDesc2.media) == null || linkedList3.size() != 0) { z15 = false; } else { z15 = true; } if (z15) { return false; } FinderObjectDesc finderObjectDesc3 = finderObject.objectDesc; if (finderObjectDesc3 == null || (linkedList2 = finderObjectDesc3.media) == null || (finderMedia = linkedList2.get(0)) == null) { i16 = 0; } else { i16 = finderMedia.mediaType; } if (!a5Var.r().contains(Integer.valueOf(i16))) { return false; } FinderObjectDesc finderObjectDesc4 = finderObject.objectDesc; if (!(finderObjectDesc4 == null || (linkedList = finderObjectDesc4.media) == null)) { Iterator<T> it = linkedList.iterator(); while (it.hasNext()) { if (it.next().mediaType != i16) { return false; } } } return true; } public final void P1(ImageView imageView, FinderAuthInfo finderAuthInfo, int i15, fh fhVar) { m.g(imageView, "view"); imageView.setVisibility(8); Drawable drawable = imageView.getDrawable(); if (drawable != null) { drawable.setColorFilter(null); } if (fhVar != null) { vf vfVar = fhVar.f21625i; if (vfVar != null) { String str = f119007b; Log.i(str, "set biz authInfo, authType = " + vfVar.f39807d + ", authIconUrl = " + vfVar.f39808e); f119006a.N0(imageView, vfVar.f39807d, vfVar.f39808e, i15); } } else if (finderAuthInfo != null) { String str2 = f119007b; Log.i(str2, "authType = " + finderAuthInfo.authIconType + ", authIconUrl = " + finderAuthInfo.authIconUrl); f119006a.N0(imageView, finderAuthInfo.authIconType, finderAuthInfo.authIconUrl, i15); } } public final boolean Q0(int i15, long j15) { return i15 > 0 || (j15 != 0 && j15 * ((long) 1000) < e6.c()); } public final FinderImgFeedMusicTag R(RecyclerView.z zVar) { FinderImgFeedMusicTag finderImgFeedMusicTag; Object obj; View view; if (zVar == null || (view = zVar.f7101d) == null) { finderImgFeedMusicTag = null; } else { finderImgFeedMusicTag = (FinderImgFeedMusicTag) view.findViewById(R.id.agy); } if (finderImgFeedMusicTag != null) { obj = finderImgFeedMusicTag.getTag(R.id.fun); } else { obj = null; } if (obj == null) { return null; } Object tag = finderImgFeedMusicTag.getTag(R.id.fun); m.e(tag, "null cannot be cast to non-null type kotlin.Boolean"); if (!((Boolean) tag).booleanValue()) { return null; } return finderImgFeedMusicTag; } public final boolean R0() { boolean z15; boolean z16; boolean TL = ((e2) j.c(e2.class)).TL(); if ((u0.j() & 34359738368L) == 0) { z15 = true; } else { z15 = false; } if (!((kd3.i) j.c(kd3.i.class)).isTeenMode() || ((kd3.i) j.c(kd3.i.class)).hr() != 2) { z16 = false; } else { z16 = true; } if (!TL || !z15 || z16) { return false; } return true; } public final String S(Context context, qo0 qo02, int i15) { String str; boolean z15; String str2; m.g(context, "context"); if (qo02 == null || (str = qo02.f34453r) == null) { str = ""; } if (str.length() == 0) { z15 = true; } else { z15 = false; } if (!z15) { return str; } String d15 = s0.d((long) i15); if (!(qo02 == null || (str2 = qo02.f34444f) == null)) { String str3 = d15 + str2; if (str3 != null) { return str3; } } String string = context.getResources().getString(R.string.ciz, d15); m.f(string, "context.resources.getStr…ity_item_desc, countText)"); return string; } public final boolean S0(FinderObject finderObject) { m.g(finderObject, "feedObject"); int i15 = finderObject.adFlag; return (i15 & 8) > 0 || (i15 & 128) > 0; } public final void S1(ImageView imageView, TextView textView, lw1 lw12, int i15) { boolean z15; int i16; boolean z16; String str; m.g(imageView, "authIconView"); m.g(textView, "nickNameView"); m.g(lw12, "shareObject"); String str2 = lw12.f29014x; if (str2 == null || str2.length() == 0) { z15 = true; } else { z15 = false; } if (z15) { i16 = lw12.f29010t; } else { i16 = lw12.f29015y; } String str3 = lw12.f29014x; if (str3 == null || str3.length() == 0) { z16 = true; } else { z16 = false; } if (z16) { str = lw12.f29011u; } else { str = lw12.f29016z; } ViewGroup.LayoutParams layoutParams = textView.getLayoutParams(); m.e(layoutParams, "null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams"); ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams; Q1(this, imageView, i16, str, 0, 8, null); if (i16 == 1 || i16 == 2) { marginLayoutParams.setMarginEnd(i15); } else { marginLayoutParams.setMarginEnd(0); } textView.setLayoutParams(marginLayoutParams); } public final int T(float f15, int i15) { int i16 = 255; int i17 = (int) (f15 * ((float) 255)); if (i17 <= 0) { i17 = 0; } if (255 > i17) { i16 = i17; } return (i16 << 24) + (i15 & 16777215); } public final boolean T0(String str) { if (str != null && !y.j(str, "@stranger", false) && !z1.b5(str) && !m.b(str, u0.r()) && w0.F(str)) { return true; } return false; } public final void T1(Intent intent, int i15, int i16) { m.g(intent, "intent"); int i17 = 0; if (i15 == 1) { if (i16 == 0) { i17 = 37; } else if (i16 == 1) { i17 = 35; } } else if (i16 == 0) { i17 = 36; } else if (i16 == 1) { i17 = 34; } intent.putExtra("key_entrance_type", i17); } public final int U(int i15) { if (i15 == 1) { return 18; } if (i15 == 2) { return 16; } if (i15 == 3) { zz1.e eVar = zz1.e.f356376d; eVar.getClass(); tl1.c<Integer> cVar = zz1.e.f356479l1; if (cVar.t().intValue() == 2) { return 170; } eVar.getClass(); if (cVar.t().intValue() == 1) { return 155; } return 17; } else if (i15 != 4) { return -1; } else { return 20; } } public final boolean U0(FinderObject finderObject) { m.g(finderObject, "feedObject"); int i15 = finderObject.adFlag; return (i15 & 8) > 0 || (i15 & 64) > 0 || (i15 & 128) > 0; } public final void U1(TextView textView, Spannable spannable) { m.g(textView, "tv"); m.g(spannable, MimeTypes.BASE_TYPE_TEXT); textView.setOnTouchListener(new r4(textView)); } public final List<d3> V(DataBuffer<d3> dataBuffer, int i15, l<? super d3, Boolean> lVar) { int i16 = 0; if (lVar == null) { ArrayList arrayList = new ArrayList(); int i17 = 0; for (d3 d3Var : dataBuffer) { int i18 = i17 + 1; if (i17 >= 0) { if (i17 >= i15) { arrayList.add(d3Var); } i17 = i18; } else { u.l(); throw null; } } return arrayList; } ArrayList arrayList2 = new ArrayList(); for (d3 d3Var2 : dataBuffer) { int i19 = i16 + 1; if (i16 >= 0) { d3 d3Var3 = d3Var2; if (i16 >= i15 && lVar.invoke(d3Var3).booleanValue()) { arrayList2.add(d3Var3); } i16 = i19; } else { u.l(); throw null; } } return arrayList2; } public final boolean V0(i84.o oVar, BaseFinderFeed baseFinderFeed) { MMActivity mMActivity; T t15; boolean z15; m.g(oVar, "holder"); m.g(baseFinderFeed, "item"); r rVar = r.f342954a; Context context = oVar.A; m.f(context, "holder.context"); int i15 = ((ta) rVar.b(context).a(ta.class)).l0().f17675i; Context context2 = oVar.A; if (context2 instanceof MMActivity) { mMActivity = (MMActivity) context2; } else { mMActivity = null; } if (mMActivity == null) { return false; } Set<ym1.m> value = ((ym1.n) rVar.e(e2.class).a(ym1.n.class)).o5(baseFinderFeed.getItemId(), i15).getValue(); if (value == null) { return false; } Iterator<T> it = value.iterator(); boolean z16 = false; while (it.hasNext()) { Iterator<T> it4 = it.next().f346948d.iterator(); while (it4.hasNext()) { LinkedList<r15> linkedList = it4.next().style; m.f(linkedList, "it.style"); Iterator<T> it5 = linkedList.iterator(); while (true) { if (!it5.hasNext()) { t15 = null; break; } t15 = it5.next(); int i16 = t15.f34849h; if (i16 == 14 || i16 == 16) { z15 = true; continue; } else { z15 = false; continue; } if (z15) { break; } } if (t15 != null) { z16 = true; } } } return z16; } public final void V1(Context context, String str) { m.g(context, "context"); m.g(str, "wording"); i14.y0.d(context, str, g.f119054a); } public final String W(int i15) { if (i15 == 1) { return dj1.b.f200487e.N5(); } if (i15 == 2) { String r15 = u0.r(); m.f(r15, "{\n Config…mUserInfo()\n }"); return r15; } else if (i15 != 3) { String r16 = u0.r(); m.f(r16, "{\n Config…mUserInfo()\n }"); return r16; } else { String k15 = u0.k(); m.f(k15, "{\n Config…sUsername()\n }"); return k15; } } public final boolean W0(String str) { m.g(str, ConstantsKinda.INTENT_LITEAPP_PATH); long currentTimeMillis = System.currentTimeMillis(); boolean z15 = false; if (!u1.k(str)) { return false; } RandomAccessFile randomAccessFile = null; try { randomAccessFile = u1.z(n2.a(str), false); fk0.a c15 = fk0.c.c(randomAccessFile, new byte[8], fk0.a.f215228f, 4194304); long j15 = (long) 8; long j16 = c15.f215248d + j15; long a15 = c15.a() - j15; Log.i(f119007b, "[isMoovOptimize] cost=" + (System.currentTimeMillis() - currentTimeMillis) + "ms beginPos=" + j16 + " remains=" + a15); if (j16 > 0 && j16 <= 128) { z15 = true; } } catch (Exception unused) { } catch (Throwable th5) { Util.qualityClose(randomAccessFile); throw th5; } Util.qualityClose(randomAccessFile); return z15; } public final void W1(long j15, boolean z15, int i15) { if (BuildInfo.IS_FLAVOR_PURPLE) { FeedUpdateEvent feedUpdateEvent = new FeedUpdateEvent(); FeedUpdateEvent.a aVar = feedUpdateEvent.f62754d; aVar.f62755a = j15; aVar.f62758d = z15 ? 1 : 0; aVar.f62757c = i15; aVar.f62756b = 7; feedUpdateEvent.publish(); } } public final JSONArray X(RecyclerView recyclerView) { m.g(recyclerView, "recyclerView"); wg4.l<Integer, Integer> G0 = G0(recyclerView, false); List<jm1.i> b05 = b0(G0.f332807d.intValue(), G0.f332808e.intValue(), recyclerView); JSONArray jSONArray = new JSONArray(); for (T t15 : b05) { JSONObject jSONObject = new JSONObject(); jSONObject.put("feedid", m60.d.p(t15.f241276a.getItemId())); jSONObject.put("feedindex", t15.f241277b); i84.q qVar = t15.f241278c; if (qVar != null) { jSONObject.put("x", qVar.f230906a + 1); jSONObject.put("width", qVar.f230907b); jSONObject.put("height", qVar.f230908c); } jSONArray.put(jSONObject); } return jSONArray; } public final boolean X0(BaseFinderFeed baseFinderFeed) { m.g(baseFinderFeed, "item"); return baseFinderFeed.t().getFeedObject().incFriendLikeCount > 0 && baseFinderFeed.t().getFeedObject().msgEventFlag == 1; } public final int X1(int i15) { if (i15 == 1) { return 0; } if (i15 == 2) { return 1; } switch (i15) { case 4: return 2; case 128: return 4; case 256: return 10; case 512: return 5; case 1024: return 6; case 2048: return 7; case 4096: return 8; case 8192: return 14; case 33280: return 17; case 33536: return 21; case 131072: return 18; case 196608: return 19; case 1048576: return 23; case 4194304: return 29; default: return 3; } } public final String Y(String str, String str2, boolean z15) { String str3 = ""; if (Util.isNullOrNil(str)) { return str2 == null ? str3 : str2; } StringBuffer stringBuffer = new StringBuffer(); d.b bVar = sk1.d.f302423a; bVar.getClass(); boolean z16 = false; if (str != null) { z16 = y.j(str, "@finder", false); } if (z16) { if (Util.isNullOrNil(str2)) { m.d(str); q b15 = bVar.b(str); if (b15 != null) { str3 = b15.getNickname(); } } else if (str2 != null) { str3 = str2; } stringBuffer.append("displayName is is finder contact"); } else { z1 z1Var = ((jh2.k0) z.q(jh2.k0.class)).Zx().get(str); if (((int) z1Var.V1) != 0 && !Util.isNullOrNil(z1Var.f())) { str3 = z1Var.f(); m.f(str3, "ct.displayRemark"); stringBuffer.append("displayName is " + str3); } else if (Util.isNullOrNil(str2)) { str3 = z1Var.getUsername(); m.f(str3, "ct.getUsername()"); } else if (str2 != null) { str3 = str2; } } if (z15) { String str4 = f119007b; Log.i(str4, "getDisplayName username " + str + " nickname " + str2 + " buf:" + ((Object) stringBuffer)); } return str3; } public final boolean Y0(Context context) { long j15; boolean z15; m.g(context, "context"); zz1.e.f356376d.getClass(); boolean z16 = !((Boolean) ((vl1.a) ((n) zz1.e.f356646xb).getValue()).t()).booleanValue(); q b15 = sk1.d.f302423a.b(r32.b.c(context)); if (b15 != null) { j15 = b15.field_additionalFlag; } else { j15 = 0; } if ((j15 & 4) == 0) { z15 = true; } else { z15 = false; } Log.i(f119007b, "getUserInteractEnableStat :" + z15 + " enable:" + z16); if (!z15 || !z16) { return false; } return true; } public final String Y1(Context context, int i15) { m.g(context, "context"); switch (i15) { case 1: String string = context.getResources().getString(R.string.cku); m.f(string, "context.resources.getStr…_all_live_big_card_title)"); return string; case 2: String string2 = context.getResources().getString(R.string.ckx); m.f(string2, "context.resources.getStr….finder_all_member_title)"); return string2; case 3: String string3 = context.getResources().getString(R.string.f3r); m.f(string3, "context.resources.getStr…profile_feed_media_title)"); return string3; case 4: String string4 = context.getResources().getString(R.string.eyc); m.f(string4, "context.resources.getStr…file_collection_tab_name)"); return string4; case 5: String string5 = context.getResources().getString(R.string.ez4); m.f(string5, "context.resources.getStr…er_profile_live_tab_name)"); return string5; case 6: String string6 = context.getResources().getString(R.string.ezw); m.f(string6, "context.resources.getStr…rofile_qq_music_tab_name)"); return string6; case 7: String string7 = context.getResources().getString(R.string.f368109cl0); m.f(string7, "context.resources.getStr…ring.finder_all_mp_title)"); return string7; case 8: String string8 = context.getResources().getString(R.string.f368112cl3); m.f(string8, "context.resources.getStr…inder_all_template_title)"); return string8; case 9: String string9 = context.getResources().getString(R.string.eyu); m.f(string9, "context.resources.getStr…r_profile_emoji_tab_name)"); return string9; case 10: String string10 = context.getResources().getString(R.string.f0d); m.f(string10, "context.resources.getStr…file_ting_audio_tab_name)"); return string10; case 11: String string11 = context.getResources().getString(R.string.ezg); m.f(string11, "context.resources.getStr…profile_newlife_tab_name)"); return string11; case 12: String string12 = context.getResources().getString(R.string.eot); m.f(string12, "context.resources.getStr…string.finder_more_video)"); return string12; default: return "UNKNOWN"; } } public final boolean Z0(FinderObject finderObject) { m.g(finderObject, "feedObject"); return (finderObject.adFlag & 128) > 0; } public final int Z1(int i15) { if (i15 == 0) { return 1; } if (i15 == 1) { return 512; } if (i15 == 2) { return 1024; } if (i15 == 3) { return 2048; } if (i15 != 4) { return i15 != 1001 ? 1 : 33024; } return 4096; } public final d3 a0(int i15, List<? extends d3> list) { m.g(list, "feedList"); if (i15 < 0 || i15 >= list.size()) { return null; } return (d3) list.get(i15); } public final boolean a1(y53 y532) { if (y532 != null) { c10 c102 = y532.B; if (c102 != null && c102.f17839j) { return false; } } return true; } public final void b(String str, int i15) { m.g(str, "logPrefix"); a5.f118672a.b(str, i15); } public final List<jm1.i> b0(int i15, int i16, RecyclerView recyclerView) { m.g(recyclerView, "recyclerView"); LinkedList linkedList = new LinkedList(); if (i15 < 0 || i16 < 0 || i15 > i16) { return c0.F0(linkedList); } RecyclerView.e adapter = recyclerView.getAdapter(); if (adapter instanceof WxRecyclerAdapter) { WxRecyclerAdapter wxRecyclerAdapter = (WxRecyclerAdapter) adapter; List data = wxRecyclerAdapter.getData(); if (i15 <= i16) { while (true) { int n65 = i15 - wxRecyclerAdapter.n6(); if (n65 >= 0 && n65 < data.size()) { i84.c cVar = (i84.c) data.get(n65); if (cVar.getItemId() != 0 && (cVar instanceof d3)) { jm1.i iVar = new jm1.i((d3) cVar, n65, null, 4, null); i84.q qVar = wxRecyclerAdapter.f189708v.get(cVar.getItemId()); if (qVar != null) { iVar.f241278c = qVar; } linkedList.add(iVar); } } if (i15 == i16) { break; } i15++; } } } else if (adapter instanceof j6) { j6 j6Var = (j6) adapter; List<BaseFinderFeed> data2 = j6Var.getData(); if (i15 <= i16) { while (true) { int s15 = j6Var.s1(i15); if (s15 >= 0 && s15 < data2.size()) { BaseFinderFeed baseFinderFeed = data2.get(s15); if (baseFinderFeed.getItemId() != 0) { linkedList.add(new jm1.i(baseFinderFeed, s15, null, 4, null)); } } if (i15 == i16) { break; } i15++; } } } return c0.F0(linkedList); } public final boolean b1(String str) { q b15 = sk1.d.f302423a.b(str); long j15 = b15 != null ? b15.field_additionalFlag : 0; return (j15 & 1) == 1 && (j15 & 2) == 2; } public final int b2(int i15, int i16, float f15) { if (f15 <= 0.5f) { int alpha = Color.alpha(i15); if (alpha == 0) { alpha = 255; } return Color.argb(Math.min(nh4.c.b((0.5f - f15) * ((float) 255) * ((float) 2)), alpha), Color.red(i15), Color.green(i15), Color.blue(i15)); } int alpha2 = Color.alpha(i16); if (alpha2 == 0) { alpha2 = 255; } return Color.argb(Math.min(nh4.c.b((f15 - 0.5f) * ((float) 255) * ((float) 2)), alpha2), Color.red(i16), Color.green(i16), Color.blue(i16)); } public final void c(View view, View view2, float f15, int i15, String str, long j15, int i16) { boolean z15; int i17; int i18; int i19; m.g(view2, "child"); if (view != null) { Context context = view.getContext(); m.e(context, "null cannot be cast to non-null type android.app.Activity"); Context baseContext = ((Activity) context).getBaseContext(); if (baseContext.getResources().getConfiguration().orientation == 1) { z15 = true; } else { z15 = false; } if (!z15 ? (i17 = baseContext.getResources().getDisplayMetrics().widthPixels) < (i19 = baseContext.getResources().getDisplayMetrics().heightPixels) : (i17 = baseContext.getResources().getDisplayMetrics().widthPixels) > (i19 = baseContext.getResources().getDisplayMetrics().heightPixels)) { i17 = i19; } h4 h4Var = f119006a; h4Var.getClass(); int intValue = i15 - ((Number) ((n) f119021p).getValue()).intValue(); float f16 = (float) i15; float f17 = (float) i17; float f18 = (f16 * 1.0f) / f17; float D0 = (((float) (intValue - h4Var.D0())) * 1.0f) / f17; float f19 = (((float) intValue) * 1.0f) / f17; wg4.g gVar = f119019n; float intValue2 = (((float) (intValue - ((Number) ((n) gVar).getValue()).intValue())) * 1.0f) / f17; float f25 = 0.45f * f16; int b15 = nh4.c.b(0.05f * f16); if (Float.isNaN(f15)) { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = i17; ViewGroup.LayoutParams layoutParams = view.getLayoutParams(); m.e(layoutParams, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) layoutParams; layoutParams2.topMargin = h4Var.D0(); layoutParams2.bottomMargin = 0; layoutParams2.gravity = 48; g.a.b(r32.a.f292946b, "calculateMedia_radio_error", false, null, null, false, false, new d(str, j15), 60, null); i18 = -2; } else { int i25 = i16 & 1; if (i25 != 0 || ((Boolean) ((n) f119022q).getValue()).booleanValue()) { if (f15 >= f18) { view2.getLayoutParams().height = i15; view2.getLayoutParams().width = nh4.c.b(f16 / f15); } else { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = nh4.c.b(f17 * f15); } ViewGroup.LayoutParams layoutParams3 = view.getLayoutParams(); m.e(layoutParams3, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams4 = (FrameLayout.LayoutParams) layoutParams3; layoutParams4.topMargin = 0; layoutParams4.bottomMargin = 0; layoutParams4.gravity = 17; if (i25 != 0) { i18 = -100; } else { i18 = -1; } } else if (f15 >= f18) { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = nh4.c.b(f17 * f15); ViewGroup.LayoutParams layoutParams5 = view.getLayoutParams(); m.e(layoutParams5, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams6 = (FrameLayout.LayoutParams) layoutParams5; layoutParams6.topMargin = 0; layoutParams6.bottomMargin = 0; layoutParams6.gravity = 17; i18 = 1; } else if (f19 < f15) { view2.getLayoutParams().width = nh4.c.b(f16 / f15); view2.getLayoutParams().height = i15; ViewGroup.LayoutParams layoutParams7 = view.getLayoutParams(); m.e(layoutParams7, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams8 = (FrameLayout.LayoutParams) layoutParams7; layoutParams8.topMargin = 0; layoutParams8.bottomMargin = 0; layoutParams8.gravity = 17; i18 = 2; } else if (D0 < f15) { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = intValue; ViewGroup.LayoutParams layoutParams9 = view.getLayoutParams(); m.e(layoutParams9, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams10 = (FrameLayout.LayoutParams) layoutParams9; layoutParams10.topMargin = 0; layoutParams10.bottomMargin = 0; layoutParams10.gravity = 48; i18 = 3; } else { float f26 = f17 * f15; if (f25 - (f26 / ((float) 2)) >= ((float) h4Var.D0())) { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = nh4.c.b(f26); ViewGroup.LayoutParams layoutParams11 = view.getLayoutParams(); m.e(layoutParams11, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams12 = (FrameLayout.LayoutParams) layoutParams11; layoutParams12.topMargin = -b15; layoutParams12.bottomMargin = 0; layoutParams12.gravity = 17; i18 = 4; } else if (D0 <= f15 || f15 < 1.7777778f) { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = nh4.c.b(f26); ViewGroup.LayoutParams layoutParams13 = view.getLayoutParams(); m.e(layoutParams13, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams14 = (FrameLayout.LayoutParams) layoutParams13; layoutParams14.topMargin = h4Var.D0(); layoutParams14.bottomMargin = 0; layoutParams14.gravity = 48; i18 = 6; } else { view2.getLayoutParams().width = i17; view2.getLayoutParams().height = nh4.c.b(f17 * intValue2); ViewGroup.LayoutParams layoutParams15 = view.getLayoutParams(); m.e(layoutParams15, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"); FrameLayout.LayoutParams layoutParams16 = (FrameLayout.LayoutParams) layoutParams15; layoutParams16.topMargin = ((Number) ((n) gVar).getValue()).intValue(); layoutParams16.bottomMargin = 0; layoutParams16.gravity = 48; i18 = 5; } } } Log.i(f119007b, "calculateMediaLayoutParams: source=" + i18 + ", tag=" + str + ", screenWidth=" + i17 + ", screenHeight=" + i15 + ", radio=" + f15 + ", screenRadio=" + f18 + ", avatarFromScreenTopRadio=" + f19 + ", avatarFromTopBarRadio=" + D0 + ", isPortrait=" + z15); } } public final List<jm1.i> c0(int i15, int i16, RecyclerView recyclerView) { m.g(recyclerView, "recyclerView"); LinkedList linkedList = new LinkedList(); if (i15 < 0 || i16 < 0 || i15 > i16) { return c0.F0(linkedList); } RecyclerView.e adapter = recyclerView.getAdapter(); if (adapter instanceof WxRecyclerAdapter) { WxRecyclerAdapter wxRecyclerAdapter = (WxRecyclerAdapter) adapter; List data = wxRecyclerAdapter.getData(); if (i15 <= i16) { int i17 = 0; while (true) { int n65 = i15 - wxRecyclerAdapter.n6(); if (n65 >= 0 && n65 < data.size()) { i84.c cVar = (i84.c) data.get(n65); if (cVar.getItemId() != 0 && (cVar instanceof BaseFinderFeed)) { BaseFinderFeed baseFinderFeed = (BaseFinderFeed) cVar; if (baseFinderFeed.t().getProfileTabScene() == 3 || baseFinderFeed.t().getProfileTabScene() == 12 || baseFinderFeed.t().getProfileTabScene() == 5) { jm1.i iVar = new jm1.i((d3) cVar, i17, null, 4, null); i84.q qVar = wxRecyclerAdapter.f189708v.get(cVar.getItemId()); if (qVar != null) { iVar.f241278c = qVar; } linkedList.add(iVar); i17++; } } } if (i15 == i16) { break; } i15++; } } } return c0.F0(linkedList); } public final boolean c1(BaseFinderFeed baseFinderFeed) { m.g(baseFinderFeed, "feed"); return a5.f118672a.U(baseFinderFeed); } public final void c2(Context context, p64.n nVar) { m.g(context, "context"); m.g(nVar, "sheet"); if (!(context instanceof Activity)) { return; } if (((Activity) context).isFinishing() || !nVar.h()) { String str = f119007b; Log.i(str, "context is finishing or not showing :" + nVar.h()); return; } try { nVar.i(); } catch (Exception e15) { Log.printDebugStack(f119007b, "", e15); } } public final int d(BaseFinderFeed baseFinderFeed, y53 y532, int i15) { int i16; m.g(baseFinderFeed, "item"); m.g(y532, "mediaObj"); if (i15 <= 0) { return 0; } Size c15 = a02.o.c(y532, true); if (baseFinderFeed.t().isLiveFeed() || c15.getWidth() <= 0) { i16 = (int) ((((double) i15) * 3.5d) / ((double) 3)); } else { i16 = (c15.getHeight() * i15) / c15.getWidth(); } float f15 = (float) i16; float f16 = (float) i15; float f17 = 1.3166667f * f16; if (f15 > f17) { return (int) f17; } float f18 = f16 * 0.95f; if (f15 >= f18) { return i16; } int i17 = (int) f18; String str = f119007b; Log.i(str, "calculateStaggeredLayoutParams: originWidth:" + i15 + " targetHeightL:" + i17); return i17; } public final String d0(String str) { zz1.e.f356376d.getClass(); int intValue = ((Number) ((tl1.c) ((n) zz1.e.G7).getValue()).t()).intValue(); if (str == null) { str = ""; } if (intValue == 1) { return "较短的测试名称"; } if (intValue != 2) { return str; } return "较长的测试名称长长长长长长长长长长长长长长长长"; } public final boolean d1(String str) { return a5.f118672a.V(str); } public final boolean e(FinderItem finderItem) { FinderObject feedObject; return (((finderItem == null || (feedObject = finderItem.getFeedObject()) == null) ? 0 : feedObject.permissionFlag) & 1073741824) == 0; } public final String e0(int i15) { String str; if (i15 == 1) { str = "follow"; } else if (i15 == 2) { str = "feed"; } else if (i15 == 3) { str = "fans"; } else if (i15 == 4) { str = "preload"; } else if (i15 == 7) { str = EnvConsts.ACTIVITY_MANAGER_SRVNAME; } else if (i15 == 8) { str = "cleaner"; } else if (i15 == 10) { str = "network"; } else if (i15 != 1307) { str = ""; } else { str = "clubauthor"; } if (Util.isNullOrNil(str)) { b6 b6Var = b6.f118823a; return b6.f118824b + "page/"; } StringBuilder sb5 = new StringBuilder(); b6 b6Var2 = b6.f118823a; sb5.append(b6.f118824b + "page/"); sb5.append(str); sb5.append('/'); return sb5.toString(); } public final boolean e1(Context context) { MMActivity mMActivity; m.g(context, "context"); if (context instanceof MMActivity) { mMActivity = (MMActivity) context; } else { mMActivity = null; } if (mMActivity == null) { return false; } String stringExtra = mMActivity.getIntent().getStringExtra("finder_username"); boolean booleanExtra = mMActivity.getIntent().getBooleanExtra("KEY_FINDER_SELF_FLAG", false); if (!m.b(stringExtra, r32.b.c(context)) || !booleanExtra) { return false; } return true; } public final boolean f(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 2) == 0; } public final String f0(Context context, BaseFinderFeed baseFinderFeed) { boolean z15; int i15; int i16; m.g(context, "context"); m.g(baseFinderFeed, "feed"); int i17 = ((ta) r.f342954a.b(context).a(ta.class)).f197187i; zz1.e.f356376d.getClass(); if (zz1.e.W8.t().intValue() != 1 || ck1.b.f50084a.d(context, baseFinderFeed.getItemId(), i17) == null) { z15 = false; } else { z15 = true; } if (baseFinderFeed.t().field_finderObject.follow_feed_count > 1) { String j15 = s0.j(baseFinderFeed.t().field_finderObject.follow_feed_count, true); Resources resources = context.getResources(); if (z15) { i16 = R.string.cve; } else { i16 = R.string.cvg; } String string = resources.getString(i16, j15); m.f(string, "{\n val countS…r\n )\n }"); return string; } Resources resources2 = context.getResources(); if (z15) { i15 = R.string.cvd; } else { i15 = R.string.cvf; } String string2 = resources2.getString(i15); m.f(string2, "{\n context.re…original_sound)\n }"); return string2; } public final boolean f1(Context context) { m.g(context, "context"); ij1.b a15 = a.C2191a.a(dj1.b.f200487e, r32.b.c(context), false, 2, null); return ((a15 != null ? a15.field_extFlag : 0) & TPMediaCodecProfileLevel.HEVCMainTierLevel62) != 0; } public final boolean g(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 128) == 0; } public final String g0(String str, int i15) { m.g(str, "key"); return a5.f118672a.y(str, i15); } public final boolean g1(Context context) { m.g(context, "context"); ij1.b a15 = a.C2191a.a(dj1.b.f200487e, r32.b.c(context), false, 2, null); return ((a15 != null ? a15.field_extFlag : 0) & 262144) != 0; } public final boolean h(int i15) { tn1.a aVar = tn1.a.f313149a; if (((Number) ((tl1.c) ((n) tn1.a.W3).getValue()).t()).intValue() == 1) { return false; } return !m60.d.u(i15, 65536); } public final boolean h1(qo0 qo02) { return !m.b(" ", qo02 != null ? qo02.f34453r : null); } /* JADX WARNING: Code restructure failed: missing block: B:49:0x00be, code lost: if (r7 > 1) goto L_0x00dd; */ /* JADX WARNING: Removed duplicated region for block: B:60:0x00df A[ADDED_TO_REGION, RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:61:0x00e0 */ /* JADX WARNING: Removed duplicated region for block: B:66:0x00ef */ /* JADX WARNING: Removed duplicated region for block: B:68:0x00f3 */ public final boolean i(BaseFinderFeed baseFinderFeed) { Integer num; int i15; FinderObjectDesc finderObjectDesc; boolean z15; FinderObjectDesc finderObjectDesc2; LinkedList<FinderMedia> linkedList; FinderMedia first; LinkedList<FinderMedia> linkedList2; boolean z16; int i16; LinkedList<FinderMedia> linkedList3; int i17; LinkedList<FinderMedia> linkedList4; LinkedList<FinderMedia> linkedList5; FinderMedia finderMedia; LinkedList<FinderMedia> linkedList6; m.g(baseFinderFeed, "feed"); if (!((ie1.h) j.c(ie1.h.class)).Lk0(h.c.DA, true)) { return false; } FinderObject finderObject = baseFinderFeed.t().getFinderObject(); m.g(finderObject, "obj"); FinderObjectDesc finderObjectDesc3 = finderObject.objectDesc; if (finderObjectDesc3 == null || Integer.valueOf(finderObjectDesc3.mediaType) == null) { Log.printInfoStack(f119007b, "obj " + finderObject, new Object[0]); } a5 a5Var = a5.f118672a; List<Integer> r15 = a5Var.r(); FinderObjectDesc finderObjectDesc4 = finderObject.objectDesc; LinkedList<FinderMedia> linkedList7 = null; if (finderObjectDesc4 != null) { num = Integer.valueOf(finderObjectDesc4.mediaType); } else { num = null; } if (c0.G(r15, num)) { FinderObjectDesc finderObjectDesc5 = finderObject.objectDesc; if (finderObjectDesc5 != null) { i15 = finderObjectDesc5.mediaType; if (i15 != 4 || baseFinderFeed.t().isMemberFeed()) { return false; } finderObjectDesc = finderObject.objectDesc; if (finderObjectDesc != null) { linkedList7 = finderObjectDesc.media; } if (linkedList7 != null) { if (finderObjectDesc == null || (linkedList2 = finderObjectDesc.media) == null || !linkedList2.isEmpty()) { z15 = false; } else { z15 = true; } if (!(z15 || (finderObjectDesc2 = finderObject.objectDesc) == null || (linkedList = finderObjectDesc2.media) == null || (first = linkedList.getFirst()) == null)) { if (((long) first.videoDuration) > Util.getLong(((jt3.b) z.q(jt3.b.class)).gv0().d("FinderRingToneVideoDurationLimit"), 300)) { return false; } if ((finderObject.permissionFlag & 64) == 0) { return true; } return false; } } return false; } } else { FinderObjectDesc finderObjectDesc6 = finderObject.objectDesc; if (finderObjectDesc6 == null || (linkedList6 = finderObjectDesc6.media) == null || linkedList6.size() != 0) { z16 = false; } else { z16 = true; } if (z16) { FinderObjectDesc finderObjectDesc7 = finderObject.objectDesc; if (finderObjectDesc7 != null) { i15 = finderObjectDesc7.mediaType; } } else { FinderObjectDesc finderObjectDesc8 = finderObject.objectDesc; if (finderObjectDesc8 == null || (linkedList5 = finderObjectDesc8.media) == null || (finderMedia = linkedList5.get(0)) == null) { i16 = 0; } else { i16 = finderMedia.mediaType; } if (a5Var.r().contains(Integer.valueOf(i16))) { i15 = 8; if (i16 == 4) { FinderObjectDesc finderObjectDesc9 = finderObject.objectDesc; if (finderObjectDesc9 == null || (linkedList4 = finderObjectDesc9.media) == null) { i17 = 0; } else { i17 = linkedList4.size(); } } FinderObjectDesc finderObjectDesc10 = finderObject.objectDesc; if (finderObjectDesc10 != null && (linkedList3 = finderObjectDesc10.media) != null) { Iterator<T> it = linkedList3.iterator(); while (true) { if (it.hasNext()) { if (it.next().mediaType != i16) { break; } } else { break; } } } } i15 = i16; } if (i15 != 4) { return false; } finderObjectDesc = finderObject.objectDesc; if (finderObjectDesc != null) { } if (linkedList7 != null) { } return false; } i15 = 0; if (i15 != 4) { } } public final w1.a i0(int i15) { w1.a aVar = w1.a.Ni; if (i15 == 0) { return aVar; } if (i15 == 1) { return w1.a.Oi; } if (i15 == 2) { return w1.a.Qi; } if (i15 == 3) { return w1.a.Pi; } if (i15 != 4) { return aVar; } return w1.a.Ui; } public final boolean i1(long j15) { return (j15 & 1) != 1; } public final boolean j(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 1) == 0; } public final Integer j0(int i15, boolean z15) { switch (i15) { case 1: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() != 1) { return null; } if (z15) { return Integer.valueOf((int) R.raw.finder_like_new_style_outlined_normal_bold); } return Integer.valueOf((int) R.raw.finder_like_new_style_outlined_normal); case 2: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_filled_normal); } return null; case 3: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_outlined_group); } return null; case 4: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_filled_group); } return null; case 5: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_outlined_lock); } return null; case 6: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_filled_lock); } return null; case 7: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_outlined_list); } return null; case 8: zz1.e.f356376d.getClass(); if (zz1.e.Ua.t().intValue() == 1) { return Integer.valueOf((int) R.raw.finder_like_new_style_filled_list); } return null; default: return null; } } public final boolean j1(int i15) { zz1.e.f356376d.getClass(); String t15 = zz1.e.Yb.t(); if (!m.b(f119029x, t15)) { f119029x = t15; HashSet<Integer> hashSet = f119028w; List<String> X = d0.X(t15, new String[]{"/"}, false, 0, 6, null); ArrayList arrayList = new ArrayList(v.m(X, 10)); for (String str : X) { arrayList.add(Integer.valueOf(Util.getInt(str, -1))); } hashSet.addAll(c0.A0(arrayList)); } HashSet<Integer> hashSet2 = f119028w; if (hashSet2 == null || !hashSet2.contains(Integer.valueOf(i15))) { return false; } return true; } public final boolean k(FinderObject finderObject) { boolean z15; boolean z16; int i15; int i16; m.g(finderObject, l3.COL_FINDEROBJECT); if ((finderObject.permissionFlag & 16) == 0) { z15 = true; } else { z15 = false; } r91 r912 = finderObject.liveInfo; if (r912 != null) { if (r912 != null) { i16 = r912.f35024a1; } else { i16 = 0; } z16 = h(i16); } else { z16 = true; } mq1 mq12 = finderObject.object_extend; if (mq12 != null) { i15 = mq12.f30038f; } else { i15 = 0; } if ((i15 & 4) > 0) { return false; } if (!z15 || !z16) { return false; } return true; } public final boolean k1() { return BuildInfo.IS_FLAVOR_RED || BuildInfo.IS_FLAVOR_PURPLE || BuildInfo.DEBUG || WeChatEnvironment.hasDebugger(); } public final boolean l(FinderObject finderObject) { m.g(finderObject, l3.COL_FINDEROBJECT); return (finderObject.permissionFlag & 2097152) == 0; } public final <T, E> List<E> l0(List<? extends T> list, Class<E> cls) { m.g(list, "dataList"); m.g(cls, "clazz"); ArrayList arrayList = new ArrayList(); for (T t15 : list) { if (cls.isInstance(t15)) { arrayList.add(t15); } } return arrayList; } public final boolean l1() { if (dj1.b.f200487e.O5().c().f44092o == 0) { zz1.e.f356376d.getClass(); if (((Boolean) ((vl1.a) ((n) zz1.e.f356383d7).getValue()).t()).booleanValue()) { return true; } return false; } return true; } public final void m(Window window, boolean z15) { m.g(window, "window"); x4.e0(window, z15); x4.d0(window, z15); } public final float m0(String str, List<? extends y53> list, boolean z15) { float f15; m.g(str, "source"); m.g(list, "list"); y53 y532 = (y53) c0.Q(list); if (y532 == null) { return 0.75f; } for (T t15 : list) { if ((y532.f42974i * 1.0f) / y532.f42973h < (t15.f42974i * 1.0f) / t15.f42973h) { y532 = t15; } } int i15 = 1; if (z15) { dr1 dr12 = y532.f42979p0; if (dr12 != null && dr12.f19607e) { float f16 = y532.f42974i; float f17 = (dr12 != null ? dr12.f19609g : 1.0f) * f16; float f18 = f16 * (dr12 != null ? dr12.f19610h : 1.0f); Log.i(f119007b, "getMaxMediaHWRadio: top=" + f17 + ", bottom=" + f18 + ", mediaWidth=" + y532.f42973h + ", mediaHeight=" + y532.f42974i + ", source=" + str); f15 = ((f18 - f17) * 1.0f) / y532.f42973h; Log.i(f119007b, "getMaxMediaHWRadio: source=" + str + ", checkScaleInfo=" + z15 + ", case=" + i15 + ", resultRadio=" + f15); return f15; } } f15 = (y532.f42974i * 1.0f) / y532.f42973h; i15 = 0; Log.i(f119007b, "getMaxMediaHWRadio: source=" + str + ", checkScaleInfo=" + z15 + ", case=" + i15 + ", resultRadio=" + f15); return f15; } public final boolean m1() { boolean z15; boolean z16; long j15 = u0.j(); boolean V = w0.V(); if (((jt3.b) z.q(jt3.b.class)).gv0().b("ExtFunctionSwitchEntry", 0) == 1) { z15 = true; } else { z15 = false; } if ((j15 & 34359738368L) != 0) { z16 = true; } else { z16 = false; } Log.i(f119007b, "isWechatFinderDisable isShowWechatUserDialog:" + z15 + ", isWeChatUser:" + V + ", close:" + z16); if (!V || !z15 || !z16) { return false; } return true; } public final boolean n() { boolean u15 = m60.d.u(dj1.b.f200487e.O5().c().f44101x, 4); if (k1()) { String str = f119007b; Log.i(str, "[checkBindPhone] " + u15); } return u15; } public final String n0(pu1.a aVar) { m.g(aVar, "item"); jb jbVar = aVar.f285511d; if (!jbVar.q2()) { return f119006a.o0(jbVar.field_username, jbVar.field_nickname); } StringBuilder sb5 = new StringBuilder(); Iterator<FinderContact> it = jbVar.field_aggregatedContacts.f37728d.iterator(); while (it.hasNext()) { FinderContact next = it.next(); sb5.append(f119006a.o0(next.username, next.nickname)); sb5.append(","); } String sb6 = sb5.toString(); m.f(sb6, "nickNameList.toString()"); if (Util.isNullOrNil(sb6)) { return sb6; } String substring = sb6.substring(0, sb6.length() - 1); m.f(substring, "this as java.lang.String…ing(startIndex, endIndex)"); return substring; } public final String n1(FinderJumpInfo finderJumpInfo) { m.g(finderJumpInfo, "jumpInfo"); StringBuilder sb5 = new StringBuilder(); sb5.append("jump_id="); sb5.append(finderJumpInfo.jump_id); sb5.append("#jump_type="); sb5.append(finderJumpInfo.jumpinfo_type); sb5.append("#business_type="); sb5.append(finderJumpInfo.business_type); sb5.append("#wording="); sb5.append(finderJumpInfo.wording); sb5.append("#style="); LinkedList<r15> linkedList = finderJumpInfo.style; m.f(linkedList, "jumpInfo.style"); ArrayList arrayList = new ArrayList(v.m(linkedList, 10)); for (T t15 : linkedList) { arrayList.add("pos=" + t15.f34847f + "#style=" + t15.f34849h + "#screen=" + t15.f34845d + "#delayAppearTime=" + t15.f34859u + "#appearTime=" + t15.f34864z + "#disappearTime=" + t15.B + "#condition=" + t15.I); } sb5.append(arrayList); return sb5.toString(); } public final String o0(String str, String str2) { if (!Util.isNullOrNil(str)) { if (str == null) { str = ""; } if (str2 == null) { str2 = ""; } return Y(str, str2, false); } else if (str2 == null) { return ""; } else { return str2; } } public final void o1(Context context, fl1 fl12, boolean z15, int i15) { m.g(context, "context"); m.g(fl12, FirebaseAnalytics.b.LOCATION); if (Util.isNullOrNil(fl12.f21745i)) { Intent intent = new Intent(); intent.putExtra("map_view_type", 7); intent.putExtra("kwebmap_slat", Double.valueOf((double) fl12.f21741e)); intent.putExtra("kwebmap_lng", Double.valueOf((double) fl12.f21740d)); intent.putExtra("kwebmap_scale", i15); String str = fl12.f21743g; if (Util.isNullOrNil(str)) { str = fl12.f21742f; } intent.putExtra("kPoiName", str); intent.putExtra("Kwebmap_locaion", fl12.f21744h); intent.putExtra("kShowshare", z15); sv3.b.j(context, FirebaseAnalytics.b.LOCATION, ".ui.RedirectUI", intent, null); return; } String str2 = yv3.d.f349182m; m.f(str2, "MM_NEAR_LIFE_URI"); String format = String.format(str2, Arrays.copyOf(new Object[]{fl12.f21745i}, 1)); m.f(format, "format(format, *args)"); Intent intent2 = new Intent(); intent2.putExtra("rawUrl", format); sv3.b.j(context, "webview", ".ui.tools.WebViewUI", intent2, null); } public final void p() { if (f119025t) { zz1.e.f356376d.getClass(); f119026u = zz1.e.V5.t().intValue(); f119027v = ((Number) ((tl1.c) ((n) zz1.e.W5).getValue()).t()).intValue(); f119025t = false; String str = f119007b; Log.i(str, "[checkResetFullScreenConfig] reset config DISABLE_HALF_SCREEN=" + f119026u + " ALLOW_FILLING_FULL_SCREEN_VALUE=" + f119027v); } } public final FinderJumpInfo p0(FinderObject finderObject) { pp1 pp12; m.g(finderObject, "feedObject"); mq1 mq12 = finderObject.object_extend; if (mq12 == null || (pp12 = mq12.f30040h) == null) { return null; } return pp12.f33239j; } public final void p1(Context context, zv4 zv4, boolean z15, boolean z16, int i15) { String str; m.g(context, "context"); m.g(zv4, FirebaseAnalytics.b.LOCATION); fl1 fl12 = new fl1(); fl12.f21740d = zv4.f44933d; fl12.f21741e = zv4.f44934e; fl12.f21742f = zv4.f44935f; fl12.f21743g = zv4.f44936g; fl12.f21744h = zv4.f44937h; if (z15) { str = ""; } else { str = zv4.f44938i; } fl12.f21745i = str; fl12.f21746j = zv4.f44939j; fl12.f21749p = zv4.f44948v; b0 b0Var = b0.f332794a; o1(context, fl12, z16, i15); } public final boolean q(Context context, int i15, int i16, String str) { boolean z15; m.g(context, "context"); Log.e(f119007b, "checkShowCgiErrorAlter: errType = " + i15 + ", errCode = " + i16 + ", errMsg = " + str); if (!(i15 == 0 && i16 == 0)) { if (str == null || str.length() == 0) { z15 = true; } else { z15 = false; } if (!z15) { p64.a aVar = new p64.a(); aVar.f281084s = str; aVar.A = true; aVar.f281087v = x24.a.a(context).getString(R.string.f367559x1); p64.g gVar = new p64.g(context, R.style.f370474wd); gVar.d(aVar); g.i.a aVar2 = aVar.f281078m; if (aVar2 != null) { aVar2.a(gVar.f281164r); } gVar.show(); return true; } } return false; } public final bw3.d1 q0(FinderJumpInfo finderJumpInfo) { LinkedList<r15> linkedList; T t15; boolean z15; if (finderJumpInfo == null || (linkedList = finderJumpInfo.style) == null) { return null; } Iterator<T> it = linkedList.iterator(); while (true) { if (!it.hasNext()) { t15 = null; break; } t15 = it.next(); T t16 = t15; if (t16.f34847f == 8 && t16.f34849h == 10) { z15 = true; continue; } else { z15 = false; continue; } if (z15) { break; } } T t17 = t15; if (t17 != null) { return t17.f34863y; } return null; } public final void q1(Context context, Intent intent, int i15, zv4 zv4, boolean z15, int i16) { String str; m.g(context, "context"); m.g(zv4, FirebaseAnalytics.b.LOCATION); if (intent == null) { intent = new Intent(); } intent.putExtra("map_view_type", i15); intent.putExtra("kwebmap_slat", (double) zv4.f44934e); intent.putExtra("kwebmap_lng", (double) zv4.f44933d); intent.putExtra("kPoiid", zv4.f44938i); intent.putExtra("KIsFromPoiList", zv4.f44949w); String str2 = zv4.f44936g; if (Util.isNullOrNil(str2)) { str2 = zv4.f44935f; if (Util.isNullOrNil(zv4.f44937h)) { i16 = 9; } } intent.putExtra("kPoiName", str2); intent.putExtra("Kwebmap_locaion", zv4.f44937h); intent.putExtra("kwebmap_scale", i16); intent.putExtra("kShowshare", z15); intent.putExtra("key_drawer_allow_no_poiid", true); intent.putExtra("key_drawer_expend", true); if (intent.getSerializableExtra("key_from_type") == null) { intent.putExtra("key_from_type", q4.a.f309629e); } ta f15 = ta.W0.f(context); if (f15 != null) { str = f15.l0().f17671e; } else { str = null; } intent.putExtra("key_context_id", str); sv3.b.j(context, FirebaseAnalytics.b.LOCATION, ".ui.RedirectUI", intent, null); } public final int r(Context context, String str) { boolean z15; int i15; boolean z16; boolean z17; m.g(context, "context"); m.g(str, "finderUserName"); boolean z18 = false; if (str.length() == 0) { z15 = true; } else { z15 = false; } if (z15) { str = r32.b.c(context); } if (!Util.isNullOrNil(str)) { return jj1.a.f240405a.a(str); } int intValue = zz1.e.f356376d.te().t().intValue(); if (intValue != -1) { return intValue; } ij1.b a15 = a.C2191a.a(dj1.b.f200487e, str, false, 2, null); if (a15 != null) { i15 = a15.r2().f33810e; } else { i15 = 0; } if ((i15 & 2) != 0) { z16 = true; } else { z16 = false; } boolean rW = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).rW(); if (str.length() == 0) { z17 = true; } else { z17 = false; } boolean z19 = !z17; String str2 = f119007b; Log.i(str2, "[checkUserState] hasCreatedIdentity=" + z19 + ", showPostEntry=" + rW + ", isReviewing=" + z16); if (!rW) { Log.i(str2, "resultState = USER_STATE_NO_POST_QUALITY"); return 1; } if (z19) { d.b bVar = sk1.d.f302423a; q b15 = bVar.b(str); m.d(b15); boolean s25 = b15.s2(); q b16 = bVar.b(str); m.d(b16); if (b16.field_spamStatus == 2) { z18 = true; } Log.i(str2, "[checkUserState] isAccountBlocked=" + s25 + ", isAccountSilent=" + z18); if (s25) { Log.i(str2, "resultState = USER_STATE_ACCOUNT_FORBID"); return 4; } else if (z18) { Log.i(str2, "resultState = USER_STATE_ACCOUNT_SILIENT"); return 6; } else if (z16) { Log.i(str2, "resultState = USER_STATE_ACCOUNT_REVIEW_ING"); } else { Log.i(str2, "resultState = USER_STATE_NORMAL"); return 3; } } else if (z16) { Log.i(str2, "resultState = USER_STATE_ACCOUNT_REVIEW_ING"); } else { Log.i(str2, "resultState = USER_STATE_HAS_POST_QUALITY_NO_ACCOUNT"); return 2; } return 5; } public final bw3.d1 r0(FinderObject finderObject) { m.g(finderObject, "feedObject"); return q0(p0(finderObject)); } public final boolean r1(Context context, FinderJumpInfo finderJumpInfo, Integer num) { m.g(context, "context"); if (finderJumpInfo == null) { return false; } ym1.r rVar = new ym1.r(finderJumpInfo); rVar.f347032q = 8; rVar.f347033r = 10; rVar.f347023h = "timeline"; rVar.G = num; e0.f346876a.b(context, rVar, 1, null); return true; } public final long s0() { return ((x2) j.c(x2.class)).j6(); } public final boolean s1(i84.o oVar, FinderObject finderObject, Integer num) { FinderJumpInfo p05; m.g(oVar, "holder"); m.g(finderObject, "feedObject"); if (!Z0(finderObject) || (p05 = p0(finderObject)) == null) { return false; } ym1.r rVar = new ym1.r(p05); rVar.f347032q = 8; rVar.f347033r = 10; rVar.f347023h = "timeline"; rVar.G = num; e0 e0Var = e0.f346876a; Context context = oVar.A; m.f(context, "holder.context"); e0Var.b(context, rVar, 1, oVar); return true; } public final void t() { z.s().i().L(w1.a.Xj, ""); z.s().i().L(w1.a.Yj, ""); dj1.b bVar = dj1.b.f200487e; ij1.c cVar = new ij1.c(bVar.b6()); cVar.field_messageLikeBuf = null; cVar.field_messageCommentBuf = null; cVar.field_messageFollowBuf = null; bVar.k6(cVar, ij1.i.FINDER_CONFIG); z.s().i().L(w1.a.f175286fk, 0); z.s().i().L(w1.a.f175312gk, 0); z.s().i().L(w1.a.f175338hk, 0); z.s().i().L(w1.a.f175363ik, 0); z.s().i().L(w1.a.f175389jk, 0); } public final String t0(String str, String str2) { if (!Util.isNullOrNil(str, str2)) { return MMApplicationContext.getResources().getString(R.string.el5, str, str2); } else if (!Util.isNullOrNil(str)) { return str; } else { if (!Util.isNullOrNil(str2)) { return str2; } return ""; } } public final void t1(Context context) { m.g(context, "context"); Intent intent = new Intent(); intent.putExtra("rawUrl", "https://weixin.qq.com/cgi-bin/readtemplate?t=page/agreement/finder_live_user_event"); sv3.b.j(context, "webview", ".ui.tools.WebViewUI", intent, null); } public final void u() { z.s().i().L(w1.a.Qj, ""); z.s().i().L(w1.a.f175209ck, 0); } public final int u0(d3 d3Var, List<? extends d3> list) { m.g(list, "feedList"); int i15 = 0; if (d3Var != null) { int i16 = 0; for (T t15 : list) { int i17 = i16 + 1; if (i16 >= 0) { if (t15.getItemId() == d3Var.getItemId()) { i15 = i16; } i16 = i17; } else { u.l(); throw null; } } } return i15; } public final m0 u1(Context context, String str, Intent intent, int i15, l<? super String, b0> lVar) { m.g(context, "context"); Log.i(f119007b, "jump to wx profile %s", str); Intent intent2 = new Intent(); if (intent != null) { intent2.putExtras(intent); } if (!Util.isNullOrNil(str)) { intent2.putExtra("Username", str); } return com.tencent.mm.plugin.finder.view.h5.f120987d.e(context, intent2, i15, lVar); } public final FinderObject v(lw1 lw12) { dp1 dp12; int i15; m.g(lw12, "shareObj"); FinderObject finderObject = new FinderObject(); finderObject.f173515id = Util.getUnsignedLong(lw12.f28997d, 0); finderObject.objectNonceId = lw12.f29005o; finderObject.username = lw12.f28998e; finderObject.nickname = lw12.f28999f; finderObject.likeCount = -1; finderObject.favCount = -1; finderObject.forwardCount = -1; finderObject.commentCount = -1; FinderObjectDesc finderObjectDesc = new FinderObjectDesc(); finderObjectDesc.description = lw12.f29001h; finderObjectDesc.mediaType = lw12.f29002i; LinkedList<jw1> linkedList = lw12.f29004n; m.f(linkedList, "shareObj.mediaList"); ArrayList arrayList = new ArrayList(v.m(linkedList, 10)); for (T t15 : linkedList) { FinderMedia finderMedia = new FinderMedia(); finderMedia.mediaType = t15.f26651d; finderMedia.url = t15.f26652e; finderMedia.coverUrl = t15.f26659o; finderMedia.thumbUrl = t15.f26653f; finderMedia.full_thumb_url = t15.f26657j; finderMedia.width = t15.f26654g; finderMedia.height = t15.f26655h; finderMedia.videoDuration = t15.f26656i; arrayList.add(finderMedia); } finderObjectDesc.media = new LinkedList<>(arrayList); so3 so32 = lw12.I; if (so32 != null) { dp12 = so32.f36676f; if (dp12 == null) { dp12 = new dp1(); } } else { dp12 = null; } finderObjectDesc.finder_newlife_desc = dp12; finderObject.objectDesc = finderObjectDesc; if (!Util.isNullOrNil(lw12.D)) { mq1 mq12 = new mq1(); pp1 pp12 = new pp1(); h4 h4Var = f119006a; String str = lw12.D; m.d(str); pp12.f33239j = h4Var.E1(str); mq12.f30040h = pp12; finderObject.object_extend = mq12; } so3 so33 = lw12.I; if (so33 != null) { i15 = so33.f36674d; } else { i15 = 0; } finderObject.createtime = i15; FinderContact finderContact = new FinderContact(); finderContact.headUrl = lw12.f29000g; finderContact.nickname = lw12.f28999f; finderContact.username = lw12.f28998e; FinderAuthInfo finderAuthInfo = new FinderAuthInfo(); finderAuthInfo.authIconType = lw12.f29010t; finderAuthInfo.authIconUrl = lw12.f29011u; finderContact.authInfo = finderAuthInfo; if (!Util.isNullOrNil(lw12.f29013w) && !Util.isNullOrNil(lw12.f29012v)) { LinkedList<tk0> linkedList2 = new LinkedList<>(); finderContact.bind_info = linkedList2; tk0 tk02 = new tk0(); tk02.f37656d = 1; yk0 yk02 = new yk0(); LinkedList<fh> linkedList3 = new LinkedList<>(); yk02.f43496d = linkedList3; fh fhVar = new fh(); fhVar.f21621e = lw12.f29012v; fhVar.f21620d = lw12.f29009s; fhVar.f21622f = lw12.f29013w; vf vfVar = new vf(); vfVar.f39807d = lw12.f29015y; vfVar.f39808e = lw12.f29016z; fhVar.f21625i = vfVar; linkedList3.add(fhVar); tk02.f37657e = yk02; linkedList2.add(tk02); } finderObject.contact = finderContact; return finderObject; } public final String v0(String str) { m.g(str, "desc"); if (str.length() <= 5) { return str; } StringBuilder sb5 = new StringBuilder(); String substring = str.substring(0, 5); m.f(substring, "this as java.lang.String…ing(startIndex, endIndex)"); sb5.append(substring); sb5.append("***"); return sb5.toString(); } /* JADX WARNING: Removed duplicated region for block: B:15:0x00a1 */ /* JADX WARNING: Removed duplicated region for block: B:22:0x00d8 */ /* JADX WARNING: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */ public final void v1(i84.o oVar, String str, a12.h hVar) { int i15; byte[] bArr; m.g(oVar, "holder"); m.g(str, "feedUserName"); m.g(hVar, "item"); Intent intent = new Intent(); if (!Util.isNullOrNil(str)) { Context context = oVar.A; m.f(context, "holder.context"); if (m.b(str, r32.b.c(context))) { intent.putExtra("IsPoster", true); if (hVar.f620d.r2().blacklist_flag == 0 && !Util.isNullOrNil(hVar.f620d.getUsername()) && !u0.r().equals(hVar.f620d.getUsername())) { intent.putExtra("Action", 1); } intent.putExtra("feedUser", str); i15 = 3; intent.putExtra("Avatar", hVar.f620d.v2()); intent.putExtra("Nickname", hVar.f620d.getNickname()); intent.putExtra("FeedNonceId", hVar.f620d.field_objectNonceId); intent.putExtra("V5UserName", hVar.f620d.getUsername()); if (hVar.f620d.r2().msgInfo != null) { wm0 wm02 = hVar.f620d.r2().msgInfo; if (wm02 != null) { bArr = wm02.toByteArray(); } else { bArr = null; } intent.putExtra("ContactMsgInfo", bArr); } Context context2 = oVar.A; m.f(context2, "holder.context"); x1(this, context2, hVar.f620d.getUsername(), intent, i15, null, 16, null); hVar.f620d.r2(); if (hVar.f620d.r2().msgInfo != null) { String str2 = f119007b; Log.i(str2, "msgInfo is null ,feedId:" + hVar.f620d.field_feedId + ",comentId:" + hVar.f620d.q2()); return; } return; } } intent.putExtra("Action", 2); intent.putExtra("IsPoster", false); i15 = 5; intent.putExtra("Avatar", hVar.f620d.v2()); intent.putExtra("Nickname", hVar.f620d.getNickname()); intent.putExtra("FeedNonceId", hVar.f620d.field_objectNonceId); intent.putExtra("V5UserName", hVar.f620d.getUsername()); if (hVar.f620d.r2().msgInfo != null) { } Context context22 = oVar.A; m.f(context22, "holder.context"); x1(this, context22, hVar.f620d.getUsername(), intent, i15, null, 16, null); hVar.f620d.r2(); if (hVar.f620d.r2().msgInfo != null) { } } public final Intent w(BaseFinderFeedLoader baseFinderFeedLoader, LinearLayoutManager linearLayoutManager) { int i15; m.g(baseFinderFeedLoader, "feedLoader"); m.g(linearLayoutManager, "layoutManager"); Intent intent = new Intent(); DataBuffer dataListJustForAdapter = baseFinderFeedLoader.getDataListJustForAdapter(); xv3.b lastBuffer = baseFinderFeedLoader.getLastBuffer(); int initPos = baseFinderFeedLoader.getInitPos(); int C = linearLayoutManager.C(); int E = linearLayoutManager.E(); Log.i(f119007b, "fixRVPos posStart:" + C + ", posEnd " + E + ", initPos:" + initPos); if (initPos < C || initPos > E) { i15 = C; } else { i15 = -1; } BaseFeedLoader.saveCacheToIntent$default(baseFinderFeedLoader, intent, dataListJustForAdapter, lastBuffer, i15, null, 16, null); return intent; } public final JSONObject w0() { if (f119024s == null) { JSONObject jSONObject = new JSONObject(); jSONObject.put("screenwidth", gy3.a.A(MMApplicationContext.getContext())); jSONObject.put("screenheight", gy3.a.j(MMApplicationContext.getContext())); f119024s = jSONObject; } JSONObject jSONObject2 = f119024s; if (jSONObject2 == null) { return new JSONObject(); } return jSONObject2; } /* JADX WARNING: Removed duplicated region for block: B:15:0x00af */ /* JADX WARNING: Removed duplicated region for block: B:22:0x00e6 */ /* JADX WARNING: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */ public final void w1(i84.o oVar, String str, pu1.z zVar) { int i15; byte[] bArr; m.g(oVar, "holder"); m.g(str, "feedUserName"); m.g(zVar, "item"); Intent intent = new Intent(); if (!Util.isNullOrNil(str)) { Context context = oVar.A; m.f(context, "holder.context"); if (m.b(str, r32.b.c(context))) { intent.putExtra("IsPoster", true); if (zVar.f285769d.q2() == 0 && !Util.isNullOrNil(zVar.f285769d.getUsername()) && !u0.r().equals(zVar.f285769d.getUsername())) { intent.putExtra("Action", 1); } intent.putExtra("feedUser", str); i15 = 3; intent.putExtra("Avatar", zVar.f285769d.y2()); intent.putExtra("Nickname", zVar.f285772g); intent.putExtra("CommentId", zVar.f285769d.r2()); intent.putExtra("FeedId", zVar.f285769d.field_feedId); intent.putExtra("FeedNonceId", zVar.f285769d.field_objectNonceId); intent.putExtra("V5UserName", zVar.f285769d.getUsername()); if (zVar.f285769d.s2().msgInfo != null) { wm0 wm02 = zVar.f285769d.s2().msgInfo; if (wm02 != null) { bArr = wm02.toByteArray(); } else { bArr = null; } intent.putExtra("ContactMsgInfo", bArr); } Context context2 = oVar.A; m.f(context2, "holder.context"); x1(this, context2, zVar.f285769d.getUsername(), intent, i15, null, 16, null); zVar.f285769d.s2(); if (zVar.f285769d.s2().msgInfo != null) { String str2 = f119007b; Log.i(str2, "msgInfo is null ,feedId:" + zVar.f285769d.field_feedId + ",comentId:" + zVar.f285769d.r2()); return; } return; } } intent.putExtra("Action", 2); intent.putExtra("IsPoster", false); i15 = 5; intent.putExtra("Avatar", zVar.f285769d.y2()); intent.putExtra("Nickname", zVar.f285772g); intent.putExtra("CommentId", zVar.f285769d.r2()); intent.putExtra("FeedId", zVar.f285769d.field_feedId); intent.putExtra("FeedNonceId", zVar.f285769d.field_objectNonceId); intent.putExtra("V5UserName", zVar.f285769d.getUsername()); if (zVar.f285769d.s2().msgInfo != null) { } Context context22 = oVar.A; m.f(context22, "holder.context"); x1(this, context22, zVar.f285769d.getUsername(), intent, i15, null, 16, null); zVar.f285769d.s2(); if (zVar.f285769d.s2().msgInfo != null) { } } public final int x() { return (int) (e6.a() / ((long) 1000)); } public final String x0(Context context, int i15) { return a5.f118672a.E(context, i15); } public final void y(String str, k2 k2Var) { m.g(str, "source"); ((xc4.j) xc4.j.f338034d).o(new e(k2Var, str)); } public final String y0(Context context, int i15, FinderObject finderObject) { String str; if (lm1.a.a(finderObject)) { if (finderObject == null || (str = finderObject.username) == null) { str = ""; } String str2 = null; ij1.b a15 = a.C2191a.a(dj1.b.f200487e, str, false, 2, null); if (a15 != null) { str2 = a15.field_nickname; } if (str2 == null) { return ""; } return str2; } else if (i15 == 2) { String l15 = u0.l(); if (l15 == null) { return ""; } return l15; } else { q b15 = sk1.d.f302423a.b(dj1.b.f200487e.b6()); if (b15 != null) { return b15.getNickname(); } return ""; } } public final boolean y1(RecyclerView recyclerView) { RecyclerView.e adapter; boolean z15; m.g(recyclerView, "recyclerView"); RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); if (layoutManager != null) { WxRecyclerAdapter wxRecyclerAdapter = null; if (!(layoutManager instanceof LinearLayoutManager)) { layoutManager = null; } if (layoutManager != null && (adapter = recyclerView.getAdapter()) != null) { if (adapter instanceof WxRecyclerAdapter) { wxRecyclerAdapter = adapter; } if (wxRecyclerAdapter != null) { LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager; int C = linearLayoutManager.C(); int E = linearLayoutManager.E(); List data = wxRecyclerAdapter.getData(); int size = data.size(); if (C <= E) { while (true) { if (C < 0 || C >= size) { z15 = false; } else { z15 = true; } if (!z15 || !(data.get(C) instanceof pu1.f0)) { if (C == E) { break; } C++; } else { return true; } } } } } } return false; } /* JADX WARNING: Code restructure failed: missing block: B:96:0x03b2, code lost: if (r0 == null) goto L_0x03b4; */ /* JADX WARNING: Removed duplicated region for block: B:130:0x04a9 */ public final void z(BaseFinderFeed baseFinderFeed, boolean z15) { String str; String str2; String str3; long j15; int i15; gq1 gq12; y53 y532; String str4; zl1 zl12; String str5; JSONObject jSONObject; FinderMediaReportObject finderMediaReportObject; String str6; boolean z16; boolean z17; m.g(baseFinderFeed, "feed"); String str7 = "Finder.FeedFullConvert"; if (baseFinderFeed.t().getId() != 0) { b02.f.f9744a.b(baseFinderFeed.t().getId()); FeedDeleteEvent feedDeleteEvent = new FeedDeleteEvent(); feedDeleteEvent.f62731d.f62732a = baseFinderFeed.t().getId(); feedDeleteEvent.publish(); Log.i(str7, "deleteItem by id " + baseFinderFeed.t().getId()); } else if (baseFinderFeed.t().getLocalId() >= 0) { f.a aVar = b02.f.f9744a; FinderItem d15 = aVar.d(baseFinderFeed.t().getLocalId()); aVar.c(baseFinderFeed.t().getLocalId()); if (z15) { ((cs.b) j.c(cs.b.class)).F20().b(baseFinderFeed.t().isLongVideo()); if (d15 != null) { ez1.x0 x0Var = ez1.x0.f211002a; FinderItem t15 = baseFinderFeed.t(); x0Var.getClass(); m.g(t15, "finderItem"); FinderFeedReportObject finderFeedReportObject = t15.field_reportObject; if (finderFeedReportObject == null) { Log.e("Finder.FinderPostReportLogic", "report21666, feedReportObj is null"); } else { FinderPostDeleteStruct finderPostDeleteStruct = new FinderPostDeleteStruct(); finderPostDeleteStruct.f67525d = t15.getLocalId(); finderPostDeleteStruct.f67526e = e6.c() - finderFeedReportObject.sendOrExitButtonTime; finderPostDeleteStruct.f67527f = (long) finderFeedReportObject.uploadCost; finderPostDeleteStruct.f67529h = (long) finderFeedReportObject.mediaProcessCost; finderPostDeleteStruct.f67530i = 15; finderPostDeleteStruct.f67532k = finderPostDeleteStruct.b("NetType", NetStatusUtil.getNetTypeString(MMApplicationContext.getContext()), true); finderPostDeleteStruct.f67533l = (long) finderFeedReportObject.retryCount; finderPostDeleteStruct.f67534m = (long) CdnLogic.getRecentAverageSpeed(1); finderPostDeleteStruct.f67536o = (long) finderFeedReportObject.videoPostType; finderPostDeleteStruct.f67537p = (long) finderFeedReportObject.postStage; finderPostDeleteStruct.f67547z = (long) t15.getPostInfo().f15971h; boolean isLongVideo = t15.isLongVideo(); finderPostDeleteStruct.A = (long) finderFeedReportObject.postTaskCost; finderPostDeleteStruct.B = (long) finderFeedReportObject.clickRepostCount; finderPostDeleteStruct.C = finderFeedReportObject.uploadMediaTotalSize; ArrayList arrayList = new ArrayList(); JSONObject jSONObject2 = new JSONObject(); arrayList.addAll(finderFeedReportObject.mediaList); arrayList.addAll(finderFeedReportObject.mediaList); Iterator<T> it = t15.getMediaList().iterator(); int i16 = 0; while (it.hasNext()) { FinderMediaReportObject finderMediaReportObject2 = it.next().f42968b1; if (!(finderMediaReportObject2 == null || finderMediaReportObject2.cdnUploadRetCode == 0)) { arrayList.add(finderMediaReportObject2); i16 = finderMediaReportObject2.cdnUploadRetCode; } } finderPostDeleteStruct.f67531j = i16; Iterator it4 = arrayList.iterator(); String str8 = ""; JSONObject jSONObject3 = jSONObject2; String str9 = str8; boolean z18 = false; while (it4.hasNext()) { FinderMediaReportObject finderMediaReportObject3 = (FinderMediaReportObject) it4.next(); JSONObject jSONObject4 = new JSONObject(); m60.i.c(finderMediaReportObject3, jSONObject4); if (!z18) { if (finderMediaReportObject3.zipTime > 0) { z18 = true; } else { z18 = false; } } Field[] declaredFields = finderMediaReportObject3.getClass().getDeclaredFields(); m.f(declaredFields, "fields"); int length = declaredFields.length; int i17 = 0; while (i17 < length) { Field field = declaredFields[i17]; Object obj = field.get(finderMediaReportObject3); if (obj == null) { str5 = str7; str6 = str8; finderMediaReportObject = finderMediaReportObject3; } else { str6 = str8; finderMediaReportObject = finderMediaReportObject3; if (!(obj instanceof Integer) || m.b(obj, 0)) { if (obj instanceof String) { if (((CharSequence) obj).length() > 0) { z17 = true; } else { z17 = false; } if (z17) { str9 = str9 + field.getName() + ':' + obj + ';'; } } if (obj instanceof xv3.a) { Field[] declaredFields2 = obj.getClass().getDeclaredFields(); m.f(declaredFields2, "innerFields"); int length2 = declaredFields2.length; jSONObject = jSONObject4; int i18 = 0; while (i18 < length2) { Field field2 = declaredFields2[i18]; Object obj2 = field2.get(obj); if ((obj2 instanceof Integer) && !m.b(obj2, 0)) { str9 = str9 + field.getName() + '-' + field2.getName() + ':' + obj2 + ';'; } else if (obj2 instanceof String) { if (((CharSequence) obj2).length() > 0) { z16 = true; } else { z16 = false; } if (z16) { str9 = str9 + field.getName() + '-' + field2.getName() + ':' + obj2 + ';'; i18++; length2 = length2; declaredFields2 = declaredFields2; obj = obj; str7 = str7; } } i18++; length2 = length2; declaredFields2 = declaredFields2; obj = obj; str7 = str7; } str5 = str7; i17++; length = length; declaredFields = declaredFields; str8 = str6; finderMediaReportObject3 = finderMediaReportObject; jSONObject4 = jSONObject; str7 = str5; } } else { str9 = str9 + field.getName() + ':' + obj + ';'; } str5 = str7; } jSONObject = jSONObject4; i17++; length = length; declaredFields = declaredFields; str8 = str6; finderMediaReportObject3 = finderMediaReportObject; jSONObject4 = jSONObject; str7 = str5; } str9 = str9 + '#'; it4 = it4; z18 = z18; jSONObject3 = jSONObject4; } str = str7; finderPostDeleteStruct.f67528g = finderPostDeleteStruct.b("MediaInfo", str9, true); String str10 = null; try { String str11 = t15.field_username; if (str11 == null) { str11 = str8; } ij1.b a15 = a.C2191a.a(dj1.b.f200487e, str11, false, 2, null); if (a15 != null) { str4 = a15.field_nickname; } else { str4 = null; } if (str4 == null) { str4 = str8; } jSONObject3.put("snn", str4); y53 y533 = (y53) c0.Q(t15.getMediaList()); if (!(y533 == null || (zl12 = y533.C) == null)) { jSONObject3.put("codecInfo", "video_score:" + zl12.f44602d + ",video_cover_score:" + zl12.f44603e + ",video_audio_score:" + zl12.f44604f + ",thumb_score:" + zl12.f44605g + ",hdimg_score:" + zl12.f44606h + ",has_stickers:" + zl12.f44607i); } } catch (Throwable th5) { Log.printErrStackTrace("Finder.FinderPostReportLogic", th5, "mediaInfoJson put snn", new Object[0]); } y53 y534 = (y53) c0.Q(t15.getMediaList()); if (y534 != null) { if (Util.isNullOrNil(y534.f42981r)) { str2 = y534.f42969d + Util.nullAsNil(y534.f42989y); } else { str2 = y534.f42981r; } } str2 = str8; if (isLongVideo) { LinkedList<y53> mediaList = t15.getMediaList(); if (!(mediaList == null || (y532 = (y53) c0.Q(mediaList)) == null)) { if (Util.isNullOrNil(y532.f42981r)) { str10 = y532.f42969d + Util.nullAsNil(y532.f42989y); } else { str10 = y532.f42981r; } } } else { str10 = str8; } String jSONObject5 = jSONObject3.toString(); m.f(jSONObject5, "mediaInfoJson.toString()"); finderPostDeleteStruct.f67535n = finderPostDeleteStruct.b("mediaInfoJson", y.q(jSONObject5, ",", ";", false), true); FinderMediaReportObject finderMediaReportObject4 = (FinderMediaReportObject) c0.Q(arrayList); if (finderMediaReportObject4 == null || finderMediaReportObject4.mediaType != 4) { str3 = str8; } else { ez1.x0 x0Var2 = ez1.x0.f211002a; LinkedList<FinderMediaReportInfo> linkedList = ((FinderMediaReportObject) c0.O(arrayList)).multiMediaInfo; m.f(linkedList, "mediaReportList.first().multiMediaInfo"); str3 = x0Var2.a(linkedList); } finderPostDeleteStruct.f67538q = finderPostDeleteStruct.b("multiMediaInfo", y.q(str3, ",", ";", false), true); finderPostDeleteStruct.f67539r = finderFeedReportObject.cgiErrorCode; finderPostDeleteStruct.f67540s = finderFeedReportObject.cgiErrorType; finderPostDeleteStruct.f67541t = finderPostDeleteStruct.b("firstUrl", str2, true); if (isLongVideo) { j15 = 1; } else { j15 = 2; } finderPostDeleteStruct.f67542u = j15; finderPostDeleteStruct.f67543v = finderPostDeleteStruct.b("longVideoUrl", str10, true); finderPostDeleteStruct.f67544w = finderFeedReportObject.megaCgiErrorCode; finderPostDeleteStruct.f67545x = finderFeedReportObject.megaCgiErrorType; finderPostDeleteStruct.f67546y = (long) finderFeedReportObject.longVideoSizeInvalid; finderPostDeleteStruct.D = finderFeedReportObject.dumpCgiErrorCode; finderPostDeleteStruct.E = finderFeedReportObject.dumpCgiErrorType; finderPostDeleteStruct.F = finderFeedReportObject.sdkShareType; FinderObjectDesc finderObjectDesc = t15.getFeedObject().objectDesc; if (finderObjectDesc == null || (gq12 = finderObjectDesc.event) == null || gq12.f22931d != 0) { i15 = 0; } else { i15 = 1; } finderPostDeleteStruct.G = i15 ^ 1; finderPostDeleteStruct.n(); ((f1) j.c(f1.class)).Pp0(finderPostDeleteStruct); if (baseFinderFeed.t().isLongVideo()) { ((cs.b) j.c(cs.b.class)).F20().j(); } gz1.a aVar2 = gz1.a.f222953a; gz1.c cVar = gz1.b.f222954a; gz1.a.d(aVar2, gz1.b.f222963j, baseFinderFeed.t(), 0, 0, 12, null); } } str = str7; if (baseFinderFeed.t().isLongVideo()) { } gz1.a aVar22 = gz1.a.f222953a; gz1.c cVar2 = gz1.b.f222954a; gz1.a.d(aVar22, gz1.b.f222963j, baseFinderFeed.t(), 0, 0, 12, null); } else { str = str7; ((cs.b) j.c(cs.b.class)).F20().i(baseFinderFeed.t().isLongVideo()); if (baseFinderFeed.t().isLongVideo()) { ((cs.b) j.c(cs.b.class)).F20().c(); } } FeedDeleteEvent feedDeleteEvent2 = new FeedDeleteEvent(); feedDeleteEvent2.f62731d.f62733b = baseFinderFeed.t().getLocalId(); feedDeleteEvent2.publish(); Log.i(str, "deleteItem by localId " + baseFinderFeed.t().getLocalId() + ", posting:" + z15); } } public final String z0(Context context, int i15) { if (i15 == 2) { String r15 = u0.r(); m.f(r15, "{\n ConfigStor…eFromUserInfo()\n }"); return r15; } if (context == null) { context = MMApplicationContext.getContext(); } m.f(context, "cxt"); return r32.b.c(context); } public final d1 z1(Intent intent, RecyclerView recyclerView, BaseFeedLoader<d3> baseFeedLoader, boolean z15, l<? super d3, Boolean> lVar) { m.g(intent, "data"); m.g(recyclerView, "recyclerView"); m.g(baseFeedLoader, "feedLoader"); RecyclerView.e adapter = recyclerView.getAdapter(); RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); baseFeedLoader.initBackCache(intent); d1 backCache = baseFeedLoader.getBackCache(); if (!(adapter instanceof WxRecyclerAdapter) || backCache == null || Util.isNullOrNil(backCache.f111112a) || backCache.f111113b == null) { return null; } WxRecyclerAdapter wxRecyclerAdapter = (WxRecyclerAdapter) adapter; int n65 = wxRecyclerAdapter.n6(); DataBuffer<d3> dataList = baseFeedLoader.getDataList(); List<d3> V = V(dataList, 0, lVar); if (V.size() != backCache.f111112a.size()) { Iterator<T> it = V.iterator(); while (it.hasNext()) { dataList.remove(it.next()); } dataList.addAll(backCache.f111112a); if (z15) { baseFeedLoader.setLastBuffer(backCache.f111113b); } wxRecyclerAdapter.notifyDataSetChanged(); } int i15 = backCache.f111114c; if (i15 >= 0) { int u05 = u0(a0(i15, backCache.f111112a), dataList); if (layoutManager instanceof StaggeredGridLayoutManager) { StaggeredGridLayoutManager staggeredGridLayoutManager = (StaggeredGridLayoutManager) layoutManager; k30.a aVar = new k30.a(); ThreadLocal<k30.a> threadLocal = k30.c.f244265a; aVar.c(0); aVar.c(Integer.valueOf(u05 + n65)); j30.a.d(staggeredGridLayoutManager, aVar.b(), "com/tencent/mm/plugin/finder/utils/FinderUtil", "mergeBackCacheAndNotify", "(Landroid/content/Intent;Landroidx/recyclerview/widget/RecyclerView;Lcom/tencent/mm/plugin/finder/feed/model/internal/BaseFeedLoader;ZLkotlin/jvm/functions/Function1;)Lcom/tencent/mm/plugin/finder/feed/model/LoaderCache;", "Undefined", "scrollToPositionWithOffset", "(II)V"); staggeredGridLayoutManager.U(((Integer) aVar.a(0)).intValue(), ((Integer) aVar.a(1)).intValue()); j30.a.e(staggeredGridLayoutManager, "com/tencent/mm/plugin/finder/utils/FinderUtil", "mergeBackCacheAndNotify", "(Landroid/content/Intent;Landroidx/recyclerview/widget/RecyclerView;Lcom/tencent/mm/plugin/finder/feed/model/internal/BaseFeedLoader;ZLkotlin/jvm/functions/Function1;)Lcom/tencent/mm/plugin/finder/feed/model/LoaderCache;", "Undefined", "scrollToPositionWithOffset", "(II)V"); } else if (layoutManager instanceof LinearLayoutManager) { LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager; k30.a aVar2 = new k30.a(); ThreadLocal<k30.a> threadLocal2 = k30.c.f244265a; aVar2.c(0); aVar2.c(Integer.valueOf(u05 + n65)); j30.a.d(linearLayoutManager, aVar2.b(), "com/tencent/mm/plugin/finder/utils/FinderUtil", "mergeBackCacheAndNotify", "(Landroid/content/Intent;Landroidx/recyclerview/widget/RecyclerView;Lcom/tencent/mm/plugin/finder/feed/model/internal/BaseFeedLoader;ZLkotlin/jvm/functions/Function1;)Lcom/tencent/mm/plugin/finder/feed/model/LoaderCache;", "Undefined", "scrollToPositionWithOffset", "(II)V"); linearLayoutManager.V(((Integer) aVar2.a(0)).intValue(), ((Integer) aVar2.a(1)).intValue()); j30.a.e(linearLayoutManager, "com/tencent/mm/plugin/finder/utils/FinderUtil", "mergeBackCacheAndNotify", "(Landroid/content/Intent;Landroidx/recyclerview/widget/RecyclerView;Lcom/tencent/mm/plugin/finder/feed/model/internal/BaseFeedLoader;ZLkotlin/jvm/functions/Function1;)Lcom/tencent/mm/plugin/finder/feed/model/LoaderCache;", "Undefined", "scrollToPositionWithOffset", "(II)V"); } } String str = f119007b; Log.i(str, "mergeBackCacheAndNotify, pos:" + backCache.f111114c + ", headCount:" + n65); return backCache; } public static final class b { /* renamed from: a reason: collision with root package name */ public d3 f119043a; /* renamed from: b reason: collision with root package name */ public i84.o f119044b; /* renamed from: c reason: collision with root package name */ public final LinkedList<b> f119045c; public b() { this(null, null, 3, null); } public b(d3 d3Var, i84.o oVar) { this.f119043a = d3Var; this.f119044b = oVar; this.f119045c = new LinkedList<>(); } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof b)) { return false; } b bVar = (b) obj; return m.b(this.f119043a, bVar.f119043a) && m.b(this.f119044b, bVar.f119044b); } public int hashCode() { d3 d3Var = this.f119043a; int i15 = 0; int hashCode = (d3Var == null ? 0 : d3Var.hashCode()) * 31; i84.o oVar = this.f119044b; if (oVar != null) { i15 = oVar.hashCode(); } return hashCode + i15; } public String toString() { StringBuilder sb5 = new StringBuilder("VisibilityFeed:"); int i15 = 0; for (T t15 : this.f119045c) { int i16 = i15 + 1; Integer num = null; if (i15 >= 0) { sb5.append("[index:" + i15); StringBuilder sb6 = new StringBuilder(); sb6.append("type:"); d3 d3Var = t15.f119043a; if (d3Var != null) { num = Integer.valueOf(d3Var.m()); } sb6.append(num); sb6.append(']'); sb5.append(sb6.toString()); i15 = i16; } else { u.l(); throw null; } } String sb7 = sb5.toString(); m.f(sb7, "sb.toString()"); return sb7; } /* JADX INFO: this call moved to the top of the method (can break code semantics) */ public /* synthetic */ b(d3 d3Var, i84.o oVar, int i15, lh4.h hVar) { this((i15 & 1) != 0 ? null : d3Var, (i15 & 2) != 0 ? null : oVar); } } }