package com.ss.android.ugc.aweme.wiki; import X.AbstractC21120sf; import X.AbstractC23680wn; import X.AbstractC30181Hj; import X.AbstractC47907IrY; import X.AbstractFutureC10390bM; import X.ActivityC34531Yc; import X.AnonymousClass0VA; import X.AnonymousClass1IL; import X.AnonymousClass1IM; import X.AnonymousClass1ZP; import X.AnonymousClass1ZS; import X.AnonymousClass229; import X.AnonymousClass8RJ; import X.AnonymousClass8RK; import X.BN1; import X.C017906e; import X.C12740f9; import X.C14300hf; import X.C16500lD; import X.C21090sc; import X.C21680tZ; import X.C21690ta; import X.C23710wq; import X.C23860x5; import X.C28643BMy; import X.C30001Gr; import X.C42338Gjv; import X.C47807Ipw; import X.C48390IzL; import X.C49189JTe; import X.C49260JVx; import X.C49261JVy; import X.C49796Jgv; import X.C49876JiD; import X.C73512uy; import X.C85703Yx; import X.C90583hP; import X.GNY; import X.JW0; import X.JW4; import X.JW6; import X.JW7; import X.JW9; import X.JWA; import X.View$OnClickListenerC49262JVz; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.text.TextUtils; import android.util.SparseArray; import android.view.View; import android.view.Window; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.RelativeLayout; import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent; import com.bytedance.covode.number.Covode; import com.bytedance.ies.dmt.ui.widget.DmtStatusView; import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer; import com.bytedance.tux.navigation.TuxNavBar; import com.ss.android.ugc.aweme.base.AnchorListManager; import com.ss.android.ugc.aweme.crossplatform.platform.webview.SingleWebView; import com.ss.android.ugc.aweme.crossplatform.view.CrossPlatformWebView; import com.ss.android.ugc.aweme.shortvideo.model.AnchorPublishStruct; import com.ss.android.ugc.aweme.utils.GsonHolder; import com.ss.android.ugc.aweme.utils.GsonProvider; import com.zhiliaoapp.musically.R; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import kotlin.g.b.m; import org.json.JSONObject; public final class AddWikiActivity extends ActivityC34531Yc implements AnonymousClass8RK { public static final C49189JTe LJJII = new C49189JTe((byte) 0); public CrossPlatformWebView LIZ; public FrameLayout LIZIZ; public LinearLayout LIZJ; public View LIZLLL; public TuxNavBar LJ; public SingleWebView LJFF; public boolean LJI; public String LJII; public String LJIIIIZZ; public String LJIIIZ; public AbstractFutureC10390bM<C73512uy> LJIIJ; public AnonymousClass1IL<C23860x5> LJIIJJI; public Runnable LJIIL; public boolean LJIILIIL; public long LJIILJJIL; public boolean LJIILL; public boolean LJIILLIIL; public String LJIIZILJ = ""; public String LJIJ = ""; public String LJIJI; public boolean LJIJJ; public boolean LJIJJLI; public boolean LJIL; public String LJJ = ""; public int LJJI = -1; public String LJJIFFI = ""; public C30001Gr LJJIII = new C30001Gr(); public String LJJIIJ = ""; public SparseArray LJJIIJZLJL; static { Covode.recordClassIndex(111239); } private final C12740f9 LIZ(C12740f9 r5, String str) { try { GsonProvider LIZJ2 = GsonHolder.LIZJ(); m.LIZIZ(LIZJ2, ""); for (Map.Entry entry : ((Map) LIZJ2.LIZIZ().fromJson(str, new GNY().type)).entrySet()) { C12740f9 LIZ2 = r5.LIZ((String) entry.getKey(), (String) entry.getValue()); m.LIZIZ(LIZ2, ""); r5 = LIZ2; } } catch (Exception unused) { } return r5; } public static View LIZ(Window window) { View decorView; if (C16500lD.LIZIZ) { decorView = window.getDecorView(); } else { synchronized (C16500lD.LIZ) { try { decorView = window.getDecorView(); } finally { } } } return decorView; } public static String LIZ(Intent intent, String str) { try { return intent.getStringExtra(str); } catch (Exception unused) { return null; } } public static final /* synthetic */ String LIZ(AddWikiActivity addWikiActivity) { String str = addWikiActivity.LJIIIZ; if (str == null) { m.LIZ(""); } return str; } private final String LJFF() { AnchorPublishStruct LIZ2 = AnchorListManager.LJIIIIZZ.LIZ(this.LJJI, this.LJJIFFI); if (LIZ2 != null) { return AnchorListManager.LJIIIIZZ.LIZ(LIZ2); } return null; } public final C12740f9 LIZ(C12740f9 r4) { C12740f9 LIZ2 = r4.LIZ("enter_from", LIZ(getIntent(), "enter_from")).LIZ("wiki_entry", LIZ(getIntent(), "wiki_entry")).LIZ("author_id", LIZ(getIntent(), "author_id")).LIZ("group_id", LIZ(getIntent(), "group_id")).LIZ("language", LIZ(getIntent(), "language")); m.LIZIZ(LIZ2, ""); return LIZ2; } public final CrossPlatformWebView LIZ() { CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } return crossPlatformWebView; } public final String LIZ(Uri uri, String str) { try { return uri.getQueryParameter(str); } catch (Exception unused) { return ""; } } public final String LIZ(String str) { String str2; AbstractC23680wn find$default; String LIZIZ2; String LIZ2; List LIZ3; if (str == null || (find$default = C23710wq.find$default(new C23710wq("https://.+/"), str, 0, 2, null)) == null || (LIZIZ2 = find$default.LIZIZ()) == null || (LIZ2 = AnonymousClass1ZS.LIZ(LIZIZ2, 8)) == null || (LIZ3 = AnonymousClass1ZS.LIZ(LIZ2, new String[]{"/"}, 0, 6)) == null || (str2 = (String) LIZ3.get(0)) == null) { str2 = ""; } return AnonymousClass1ZP.LIZ(AnonymousClass1ZP.LIZLLL(AnonymousClass1ZS.LIZ(str2, new String[]{"."}, 0, 6), 2), ".", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (AnonymousClass1IM) null, 62); } public final void LIZ(Uri uri) { boolean z = true; int i2 = 8; if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Yelp", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "TripAdvisor", true)) { if (LIZ(getIntent(), "enter_from") == null) { LinearLayout linearLayout = this.LIZJ; if (linearLayout == null) { m.LIZ(""); } linearLayout.setVisibility(0); LIZ("close", true); CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } LIZ("back", crossPlatformWebView.LIZIZ()); LIZ("more", false); return; } LinearLayout linearLayout2 = this.LIZJ; if (linearLayout2 == null) { m.LIZ(""); } linearLayout2.setVisibility(8); CrossPlatformWebView crossPlatformWebView2 = this.LIZ; if (crossPlatformWebView2 == null) { m.LIZ(""); } LIZ("close", crossPlatformWebView2.LIZIZ()); LIZ("back", true); LIZ("more", LIZLLL()); } else if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Quizlet", true)) { if (LIZ(getIntent(), "enter_from") == null) { C23710wq r1 = new C23710wq(".*/tt/[0-9]*"); String uri2 = uri.toString(); m.LIZIZ(uri2, ""); if (r1.matches(uri2)) { LinearLayout linearLayout3 = this.LIZJ; if (linearLayout3 == null) { m.LIZ(""); } linearLayout3.setVisibility(0); LIZ("close", true); CrossPlatformWebView crossPlatformWebView3 = this.LIZ; if (crossPlatformWebView3 == null) { m.LIZ(""); } LIZ("back", crossPlatformWebView3.LIZIZ()); LIZ("more", false); return; } } LinearLayout linearLayout4 = this.LIZJ; if (linearLayout4 == null) { m.LIZ(""); } linearLayout4.setVisibility(8); CrossPlatformWebView crossPlatformWebView4 = this.LIZ; if (crossPlatformWebView4 == null) { m.LIZ(""); } LIZ("close", crossPlatformWebView4.LIZIZ()); LIZ("back", true); LIZ("more", LIZLLL()); } else if (AnonymousClass1ZS.LIZ(LIZ(uri, "hide_nav_bar"), "1", true)) { LinearLayout linearLayout5 = this.LIZJ; if (linearLayout5 == null) { m.LIZ(""); } linearLayout5.setVisibility(8); View view = this.LIZLLL; if (view == null) { m.LIZ(""); } view.setVisibility(8); TuxNavBar tuxNavBar = this.LJ; if (tuxNavBar == null) { m.LIZ(""); } tuxNavBar.setVisibility(8); } else { View view2 = this.LIZLLL; if (view2 == null) { m.LIZ(""); } view2.setVisibility(0); TuxNavBar tuxNavBar2 = this.LJ; if (tuxNavBar2 == null) { m.LIZ(""); } tuxNavBar2.setVisibility(0); boolean LIZ2 = AnonymousClass1ZS.LIZ(LIZ(uri, "addButton"), "true", true); LinearLayout linearLayout6 = this.LIZJ; if (linearLayout6 == null) { m.LIZ(""); } if (LIZ2) { i2 = 0; } linearLayout6.setVisibility(i2); boolean z2 = !AnonymousClass1ZS.LIZ(LIZ(uri, "close"), "false", true); LIZ("close", z2); if (!(!AnonymousClass1ZS.LIZ(LIZ(uri, "back"), "false", true)) && z2) { z = false; } LIZ("back", z); LIZ("more", LIZLLL()); } } public final void LIZ(Object obj, boolean z) { TuxNavBar tuxNavBar = this.LJ; if (tuxNavBar == null) { m.LIZ(""); } tuxNavBar.LIZ(obj, new C42338Gjv(z)); } public final void LIZ(boolean z) { this.LJIILL = z; if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Wiki", true)) { CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } crossPlatformWebView.LIZ(z); } } public final TuxNavBar LIZIZ() { TuxNavBar tuxNavBar = this.LJ; if (tuxNavBar == null) { m.LIZ(""); } return tuxNavBar; } public final void LIZJ() { Boolean valueOf; String str = this.LJIIZILJ; if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Yelp", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "TripAdvisor", true)) { str = (String) AnonymousClass1ZS.LIZ(str, new String[]{" - "}, 0, 6).get(0); } C12740f9 r3 = new C12740f9(); String LIZ2 = LIZ(getIntent(), "placeholder_enter_from"); C12740f9 LIZ3 = r3.LIZ("enter_from", (LIZ2 == null || LIZ2.length() == 0) ? "video_post_page" : LIZ(getIntent(), "placeholder_enter_from")); String LIZ4 = LIZ(getIntent(), "shoot_way"); if (!(LIZ4 == null || LIZ4.length() == 0)) { LIZ3.LIZ("shoot_way", LIZ4); } String LIZ5 = LIZ(getIntent(), "creation_id"); if (!(LIZ5 == null || LIZ5.length() == 0)) { LIZ3.LIZ("creation_id", LIZ5); } JSONObject jSONObject = new JSONObject(); if (this.LJIJJLI) { jSONObject.put("add_from", 2); CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } String currentUrl = crossPlatformWebView.getCurrentUrl(); if (currentUrl == null) { currentUrl = this.LJJIIJ; } String LJ2 = LJ(); int i2 = this.LJJI; String jSONObject2 = jSONObject.toString(); m.LIZIZ(jSONObject2, ""); AbstractC21120sf.LIZ(new C47807Ipw(new C49876JiD(i2, jSONObject2, LJ2, null, 1, null, null, false, currentUrl, null, null, null, this.LJJIFFI, 3816, null))); finish(); C12740f9 LIZ6 = LIZ3.LIZ("anchor_type", LJFF()).LIZ("anchor_entry", LJ2); AnchorPublishStruct LIZ7 = AnchorListManager.LJIIIIZZ.LIZ(this.LJJI, this.LJJIFFI); C14300hf.LIZ("choose_anchor", LIZ6.LIZ("new_tag", (LIZ7 == null || (valueOf = Boolean.valueOf(LIZ7.hadNew)) == null || !valueOf.booleanValue()) ? "0" : "1").LIZ("status", 1).LIZ); return; } new JW0(this, str, LIZ3).invoke(); } public final boolean LIZLLL() { return this.LJIL || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Wiki", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Yelp", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "TripAdvisor", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Quizlet", true); } public final String LJ() { String str = ""; if (TextUtils.isEmpty(str)) { SingleWebView singleWebView = this.LJFF; if (singleWebView == null) { m.LIZ(str); } String title = singleWebView.getTitle(); if (title != null) { str = title; } } return TextUtils.isEmpty(str) ? this.LJIJ : str; } @Override // X.ActivityC34411Xq, X.ActivityC34531Yc public final void _$_clearFindViewByIdCache() { SparseArray sparseArray = this.LJJIIJZLJL; if (sparseArray != null) { sparseArray.clear(); } } @Override // X.ActivityC34411Xq, X.ActivityC34531Yc public final View _$_findCachedViewById(int i2) { if (this.LJJIIJZLJL == null) { this.LJJIIJZLJL = new SparseArray(); } View view = (View) this.LJJIIJZLJL.get(i2); if (view != null) { return view; } View findViewById = findViewById(i2); this.LJJIIJZLJL.put(i2, findViewById); return findViewById; } @Override // X.ActivityC34531Yc public final void finish() { super.finish(); AbstractC21120sf.LIZ(new JWA()); } @Override // X.ActivityC31021Kp, X.ActivityC34411Xq public final void onBackPressed() { CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } if (!crossPlatformWebView.LIZIZ()) { super.onBackPressed(); return; } AnonymousClass1IL<C23860x5> r0 = this.LJIIJJI; if (r0 != null) { r0.invoke(); } CrossPlatformWebView crossPlatformWebView2 = this.LIZ; if (crossPlatformWebView2 == null) { m.LIZ(""); } crossPlatformWebView2.LIZ(); } @Override // X.ActivityC31021Kp, X.AnonymousClass114, X.ActivityC34411Xq, X.ActivityC34531Yc, X.ActivityC32381Pv public final void onCreate(Bundle bundle) { AnonymousClass0VA.LIZ(this, bundle); ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onCreate", true); activityConfiguration(C49796Jgv.LIZ); super.onCreate(bundle); setContentView(R.layout.e8); View findViewById = findViewById(R.id.aqh); m.LIZIZ(findViewById, ""); this.LIZ = (CrossPlatformWebView) findViewById; View findViewById2 = findViewById(R.id.aqi); m.LIZIZ(findViewById2, ""); this.LIZIZ = (FrameLayout) findViewById2; View findViewById3 = findViewById(R.id.m0); m.LIZIZ(findViewById3, ""); this.LIZJ = (LinearLayout) findViewById3; View findViewById4 = findViewById(R.id.f5t); m.LIZIZ(findViewById4, ""); this.LIZLLL = findViewById4; View findViewById5 = findViewById(R.id.mk); m.LIZIZ(findViewById5, ""); this.LJ = (TuxNavBar) findViewById5; View findViewById6 = findViewById(R.id.m0); if (findViewById6 != null) { findViewById6.setOnClickListener(new View$OnClickListenerC49262JVz(this)); } CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } SingleWebView LIZ2 = ((AbstractC47907IrY) crossPlatformWebView.LIZ(AbstractC47907IrY.class)).LIZ(); m.LIZIZ(LIZ2, ""); this.LJFF = LIZ2; Uri data = getIntent().getData(); if (TextUtils.equals(data != null ? data.getHost() : null, "third_party_common_webview")) { Uri data2 = getIntent().getData(); String path = data2 != null ? data2.getPath() : null; this.LJIJJ = true; if (TextUtils.equals(path, "/create")) { this.LJIJJLI = true; String LIZ3 = LIZ(getIntent(), "add_button_url_regex"); if (LIZ3 == null) { LIZ3 = ""; } this.LJJ = LIZ3; this.LJJI = getIntent().getIntExtra("type", -1); String LIZ4 = LIZ(getIntent(), "subtype"); if (LIZ4 == null) { LIZ4 = ""; } this.LJJIFFI = LIZ4; String LIZ5 = LIZ(getIntent(), "url"); if (LIZ5 == null) { LIZ5 = ""; } this.LJJIIJ = LIZ5; } else if (TextUtils.equals(path, "/show")) { this.LJIL = true; } } String LIZ6 = LIZ(getIntent(), "anchor_type"); if (LIZ6 == null) { LIZ6 = ""; } this.LJIIIIZZ = LIZ6; if (LIZ6 == null || LIZ6.length() == 0) { String LJFF2 = LJFF(); if (LJFF2 == null) { LJFF2 = ""; } this.LJIIIIZZ = LJFF2; } if ((LIZ(getIntent(), "enter_from") != null && (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Wiki", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Yelp", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "TripAdvisor", true) || AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Quizlet", true))) || this.LJIL) { C14300hf.LIZ("tns_tiktok_3Panchor_report_page_view", new C12740f9().LIZ("anchor_id", LIZ(getIntent(), "anchor_id")).LIZ); } this.LJIILJJIL = System.currentTimeMillis(); String LIZ7 = LIZ(getIntent(), "title"); if (LIZ7 == null) { LIZ7 = ""; } this.LJIJ = LIZ7; String LIZ8 = LIZ(getIntent(), "url"); if (LIZ8 == null) { LIZ8 = ""; } m.LIZIZ(LIZ8, ""); Uri parse = Uri.parse(LIZ8); m.LIZIZ(parse, ""); if (!TextUtils.equals(parse.getScheme(), "https")) { ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onCreate", false); return; } Uri parse2 = Uri.parse(LIZ8); m.LIZIZ(parse2, ""); LIZ(parse2); Uri parse3 = Uri.parse(LIZ8); m.LIZIZ(parse3, ""); boolean LIZ9 = AnonymousClass1ZS.LIZ(LIZ(parse3, "noRedirect"), "true", true); this.LJIILLIIL = LIZ9; if (LIZ9) { FrameLayout frameLayout = this.LIZIZ; if (frameLayout == null) { m.LIZ(""); } frameLayout.setVisibility(0); } CrossPlatformWebView crossPlatformWebView2 = this.LIZ; if (crossPlatformWebView2 == null) { m.LIZ(""); } crossPlatformWebView2.setCustomWebViewStatus(new C49260JVx(this)); CrossPlatformWebView crossPlatformWebView3 = this.LIZ; if (crossPlatformWebView3 == null) { m.LIZ(""); } crossPlatformWebView3.setShouldOverrideInterceptor(new C48390IzL(this)); LIZ(true); getIntent().putExtra("sec_link_scene", "anchors"); CrossPlatformWebView crossPlatformWebView4 = this.LIZ; if (crossPlatformWebView4 == null) { m.LIZ(""); } CrossPlatformWebView.LIZ(crossPlatformWebView4, LIZ8, false, null, 6); CrossPlatformWebView crossPlatformWebView5 = this.LIZ; if (crossPlatformWebView5 == null) { m.LIZ(""); } crossPlatformWebView5.requestFocus(); CrossPlatformWebView crossPlatformWebView6 = this.LIZ; if (crossPlatformWebView6 == null) { m.LIZ(""); } this.LJIJI = crossPlatformWebView6.getCurrentUrl(); SingleWebView singleWebView = this.LJFF; if (singleWebView == null) { m.LIZ(""); } singleWebView.requestFocus(); this.LJIILIIL = getIntent().getBooleanExtra("show_keyboard", false); AnonymousClass8RJ.LIZ(this); Window window = getWindow(); m.LIZIZ(window, ""); View LIZ10 = LIZ(window); m.LIZIZ(LIZ10, ""); LIZ10.setBackground(new ColorDrawable(C017906e.LIZJ(this, R.color.a_))); CrossPlatformWebView crossPlatformWebView7 = this.LIZ; if (crossPlatformWebView7 == null) { m.LIZ(""); } ((DmtStatusView) crossPlatformWebView7.findViewById(R.id.b9j)).LIZ(0); CrossPlatformWebView crossPlatformWebView8 = this.LIZ; if (crossPlatformWebView8 == null) { m.LIZ(""); } SingleWebView singleWebView2 = crossPlatformWebView8.LIZ; if (singleWebView2 == null) { m.LIZ(""); } singleWebView2.controlGeolocationPermissions(false); int identifier = getResources().getIdentifier("status_bar_height", "dimen", "android"); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, identifier > 0 ? getResources().getDimensionPixelSize(identifier) : 0); View view = this.LIZLLL; if (view == null) { m.LIZ(""); } view.setLayoutParams(layoutParams); TuxNavBar tuxNavBar = this.LJ; if (tuxNavBar == null) { m.LIZ(""); } tuxNavBar.setNavActions(new C85703Yx().LIZ(new C28643BMy().LIZ(R.raw.icon_arrow_left_ltr).LIZ("back").LIZ((AnonymousClass1IL<C23860x5>) new JW4(this))).LIZ(new C28643BMy().LIZ(R.raw.icon_x_mark).LIZ("close").LIZ((AnonymousClass1IL<C23860x5>) new JW6(this))).LIZIZ(new C28643BMy().LIZ(R.raw.icon_ellipsis_vertical).LIZ("more").LIZ((AnonymousClass1IL<C23860x5>) new C90583hP(this))).LIZ(new BN1())); ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onCreate", false); } @Override // X.ActivityC31021Kp, X.ActivityC34531Yc, X.ActivityC32381Pv public final void onDestroy() { AnonymousClass0VA.LJ(this); AbstractC21120sf.LIZ(new AnonymousClass229(System.currentTimeMillis() - this.LJIILJJIL)); if (this.LIZ != null) { CrossPlatformWebView crossPlatformWebView = this.LIZ; if (crossPlatformWebView == null) { m.LIZ(""); } crossPlatformWebView.LIZLLL(this); } String LIZ2 = LIZ(getIntent(), "enter_from"); if (!(LIZ2 == null || LIZ2.length() == 0) || this.LJIL) { String LIZ3 = LIZ(getIntent(), "mob_extra"); C12740f9 r10 = new C12740f9(); if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "Yelp", true)) { C12740f9 LIZ4 = r10.LIZ("enter_from", LIZ(getIntent(), "enter_from")).LIZ("anchor_type", "Yelp").LIZ("anchor_entry", LIZ(getIntent(), "anchor_entry")).LIZ("author_id", LIZ(getIntent(), "author_id")).LIZ("group_id", LIZ(getIntent(), "group_id")).LIZ("duration", System.currentTimeMillis() - this.LJIILJJIL); m.LIZIZ(LIZ4, ""); C14300hf.LIZ("multi_anchor_stay_time", LIZ(LIZ4, LIZ3).LIZ); } else if (AnonymousClass1ZS.LIZ(this.LJIIIIZZ, "TripAdvisor", true)) { C12740f9 LIZ5 = r10.LIZ("enter_from", LIZ(getIntent(), "enter_from")).LIZ("anchor_type", "TripAdvisor").LIZ("anchor_entry", LIZ(getIntent(), "anchor_entry")).LIZ("author_id", LIZ(getIntent(), "author_id")).LIZ("group_id", LIZ(getIntent(), "group_id")).LIZ("duration", System.currentTimeMillis() - this.LJIILJJIL); m.LIZIZ(LIZ5, ""); C14300hf.LIZ("multi_anchor_stay_time", LIZ(LIZ5, LIZ3).LIZ); } else if (!this.LJIJJ) { m.LIZIZ(r10, ""); C12740f9 LIZ6 = LIZ(r10).LIZ("duration", System.currentTimeMillis() - this.LJIILJJIL); m.LIZIZ(LIZ6, ""); C14300hf.LIZ("multi_anchor_stay_time", LIZ(LIZ6, LIZ3).LIZ); } } super.onDestroy(); } @Override // X.ActivityC31021Kp, X.ActivityC34531Yc public final void onPause() { AnonymousClass0VA.LIZJ(this); super.onPause(); this.LJJIII.LIZ(); } @Override // X.ActivityC31021Kp, X.ActivityC34531Yc public final void onResume() { AnonymousClass0VA.LIZIZ(this); ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onResume", true); super.onResume(); SingleWebView singleWebView = this.LJFF; if (singleWebView == null) { m.LIZ(""); } singleWebView.setDownloadListener(JW9.LIZ); if (this.LJIJJ) { this.LJJIII.LIZ(AbstractC30181Hj.LIZ(500, TimeUnit.MILLISECONDS).LIZ(C21680tZ.LIZ(C21690ta.LIZ)).LIZIZ(C21680tZ.LIZ(C21690ta.LIZ)).LIZ(new C49261JVy(this), JW7.LIZ)); } ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onResume", false); } @Override // X.ActivityC31021Kp, X.ActivityC34531Yc, X.ActivityC32381Pv public final void onStart() { AnonymousClass0VA.LIZ(this); super.onStart(); } @Override // X.ActivityC31021Kp, X.ActivityC34531Yc, X.ActivityC32381Pv public final void onStop() { AnonymousClass0VA.LIZLLL(this); super.onStop(); if (EnterTransitionCrashOptimizer.getContext() != null && Build.VERSION.SDK_INT >= 21) { try { LIZ(getWindow()).getViewTreeObserver().dispatchOnPreDraw(); } catch (Throwable unused) { } } if (Build.VERSION.SDK_INT >= 21) { try { LIZ(getWindow()).getViewTreeObserver().dispatchOnPreDraw(); } catch (Throwable unused2) { } } } @Override // X.ActivityC34531Yc public final void onWindowFocusChanged(boolean z) { ActivityAgent.onTrace("com.ss.android.ugc.aweme.wiki.AddWikiActivity", "onWindowFocusChanged", true); super.onWindowFocusChanged(z); } public final void setStatusBar(View view) { C21090sc.LIZ(view); this.LIZLLL = view; } }