package com.tencent.mm.plugin.profile.ui; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.os.Bundle; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import bg0.d0; import bg0.l; import bg0.m; import bg0.n; import bg0.v0; import bg0.w0; import bw3.d40; import bw3.d94; import bw3.hg; import bw3.if3; import bw3.lq4; import bw3.mq4; import bw3.ng; import bw3.nu5; import bw3.y25; import bw3.z25; import com.tencent.mm.R; import com.tencent.mm.app.w1; import com.tencent.mm.autogen.events.ExDeviceBindHardDeviceEvent; import com.tencent.mm.autogen.events.ExDeviceCheckDeviceIsBoundEvent; import com.tencent.mm.autogen.events.ReportAdClickEvent; import com.tencent.mm.modelavatar.o; import com.tencent.mm.modelsns.SnsAdClick; import com.tencent.mm.plugin.appbrand.config.WxaAttributes; import com.tencent.mm.plugin.report.service.q; import com.tencent.mm.sdk.http.HttpWrapperBase; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMHandlerThread; import com.tencent.mm.sdk.platformtools.Util; import com.tencent.mm.sdk.platformtools.WeChatHosts; import com.tencent.mm.sdk.platformtools.WeChatSomeFeatureSwitch; import com.tencent.mm.sdk.storage.IAutoDBItem; import com.tencent.mm.storage.f4; import com.tencent.mm.storage.g4; import com.tencent.mm.storage.h2; import com.tencent.mm.storage.i2; import com.tencent.mm.storage.z1; import com.tencent.mm.ui.MMActivity; import com.tencent.mm.ui.base.preference.ButtonPreference; import com.tencent.mm.ui.base.preference.CheckBoxPreference; import com.tencent.mm.ui.base.preference.KeyValuePreference; import com.tencent.mm.ui.base.preference.Preference; import com.tencent.mm.ui.base.preference.PreferenceSmallCategory; import com.tencent.mm.ui.t2; import com.tencent.thumbplayer.core.downloadproxy.api.TPDownloadProxyEnum; import d60.z; import eh0.p; import fo.w; import i14.j; import ih.c; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; import junit.framework.Assert; import nf0.b3; import nf0.m6; import nf0.p3; import nf0.r; import nf0.u0; import org.json.JSONObject; import p64.i0; import rm.b; import yf0.n; import yf0.y; public class o0 implements gu3.a, n, n.c, d0 { public static final String I = (HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fy9) + "/mp/infringement?username=%s&from=1#wechat_redirect"); public String A; public SharedPreferences B = null; public CheckBoxPreference C; public Bundle D; public SnsAdClick E = null; public String F = null; public i0 G = null; public boolean H = false; /* renamed from: d reason: collision with root package name */ public MMActivity f138224d; /* renamed from: e reason: collision with root package name */ public k14.g f138225e; /* renamed from: f reason: collision with root package name */ public z1 f138226f; /* renamed from: g reason: collision with root package name */ public ih.c f138227g; /* renamed from: h reason: collision with root package name */ public List<c.a> f138228h; /* renamed from: i reason: collision with root package name */ public List<WxaAttributes.WxaEntryInfo> f138229i; /* renamed from: j reason: collision with root package name */ public c.b f138230j; /* renamed from: n reason: collision with root package name */ public int f138231n; /* renamed from: o reason: collision with root package name */ public boolean f138232o; /* renamed from: p reason: collision with root package name */ public String f138233p; /* renamed from: q reason: collision with root package name */ public d40 f138234q; /* renamed from: r reason: collision with root package name */ public boolean f138235r; /* renamed from: s reason: collision with root package name */ public String f138236s; /* renamed from: t reason: collision with root package name */ public boolean f138237t = false; /* renamed from: u reason: collision with root package name */ public boolean f138238u = false; /* renamed from: v reason: collision with root package name */ public boolean f138239v = false; /* renamed from: w reason: collision with root package name */ public boolean f138240w = false; /* renamed from: x reason: collision with root package name */ public int f138241x = 0; /* renamed from: y reason: collision with root package name */ public String f138242y; /* renamed from: z reason: collision with root package name */ public boolean f138243z; public class a implements DialogInterface.OnCancelListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ y f138244d; public a(y yVar) { this.f138244d = yVar; } public void onCancel(DialogInterface dialogInterface) { p3.e().p(536, o0.this); ExDeviceBindHardDeviceEvent exDeviceBindHardDeviceEvent = new ExDeviceBindHardDeviceEvent(); ExDeviceBindHardDeviceEvent.a aVar = exDeviceBindHardDeviceEvent.f62263d; aVar.f62267c = 2; aVar.f62268d = this.f138244d; exDeviceBindHardDeviceEvent.publish(); } } public class b implements b.AbstractC4944b { public b() { } @Override // rm.b.AbstractC4944b public void a(boolean z15, boolean z16, String str, String str2) { ih.c cVar; ih.c cVar2; if (z15) { MMActivity mMActivity = o0.this.f138224d; j.T(mMActivity, mMActivity.getString(R.string.bbq)); o0.this.f138225e.n("contact_info_time_expired", true); o0 o0Var = o0.this; z1 z1Var = o0Var.f138226f; o0Var.getClass(); if (z1Var == null || Util.isNullOrNil(str)) { Log.e("MicroMsg.ContactWidgetBizInfo", "respUsername == " + str + ", contact = " + z1Var); } else { if (z1.M5(z1Var.getUsername())) { String nullAsNil = Util.nullAsNil(z1Var.getUsername()); cVar2 = l.b(nullAsNil); if (cVar2 != null) { cVar2.field_username = str; } w0.gO0().c(nullAsNil); z1Var.a3(nullAsNil); } else { cVar2 = null; } z1Var.setUsername(str); if (((int) z1Var.V1) == 0) { p3.b().v().B3(z1Var); } if (((int) z1Var.V1) <= 0) { Log.e("MicroMsg.ContactWidgetBizInfo", "addContact : insert contact failed"); } else { nf0.w0.h0(z1Var); z1 z1Var2 = p3.b().v().get(z1Var.getUsername()); if (cVar2 != null) { w0.gO0().insert(cVar2); } else { ih.c b15 = l.b(z1Var2.getUsername()); boolean z17 = z1Var2.u3() && bg0.a.a(); if (b15 == null || (b15.N1() && !z17)) { b3.a().d(z1Var2.getUsername(), ""); ((yn.i) yz3.j.c(yn.i.class)).qe(z1Var2.getUsername()); } else if (z1Var2.c6() && !z17) { b3.a().d(z1Var2.getUsername(), ""); ((yn.i) yz3.j.c(yn.i.class)).qe(z1Var2.getUsername()); } } } } o0 o0Var2 = o0.this; o0Var2.f138240w = true; if (o0Var2.E != null) { ReportAdClickEvent reportAdClickEvent = new ReportAdClickEvent(); SnsAdClick snsAdClick = o0.this.E; snsAdClick.f79448g = 4; reportAdClickEvent.f64208d.f64209a = snsAdClick; reportAdClickEvent.publish(); } ih.c Ie = w0.gO0().Ie(o0.this.f138226f.getUsername()); Ie.field_status = 1; if (!Util.isNullOrNil(Ie.field_extInfo) || Util.isNullOrNil(Ie.field_username) || (cVar = o0.this.f138227g) == null || !Ie.field_username.equals(Util.nullAsNil(cVar.field_username))) { w0.gO0().replace(Ie); } else { w0.gO0().replace(o0.this.f138227g); } boolean booleanExtra = o0.this.f138224d.getIntent().getBooleanExtra("key_biz_profile_stay_after_follow_op", false); boolean booleanExtra2 = o0.this.f138224d.getIntent().getBooleanExtra("key_start_biz_profile_from_app_brand_profile", false); if (Ie.m1()) { Intent intent = new Intent(); intent.putExtra("enterprise_biz_name", o0.this.f138226f.getUsername()); intent.putExtra("enterprise_biz_display_name", ((hh2.j) yz3.j.c(hh2.j.class)).getDisplayName(o0.this.f138226f.getUsername())); intent.putExtra("enterprise_from_scene", 7); intent.addFlags(67108864); sv3.b.t(o0.this.f138224d, ".ui.conversation.EnterpriseConversationUI", intent, null); o0.this.f138224d.finish(); } else { Intent intent2 = new Intent(); intent2.putExtra("Chat_User", o0.this.f138226f.getUsername()); intent2.putExtra("key_has_add_contact", true); intent2.putExtra("finish_direct", true); if (booleanExtra2) { intent2.addFlags(268435456); } ((w1) ((dn.h) yz3.j.c(dn.h.class)).mU()).f(intent2, o0.this.f138224d); if (booleanExtra || booleanExtra2) { o0.this.f138224d.finish(); } } o0.this.n(3, null); } } } public class c implements DialogInterface.OnClickListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ ih.c f138247d; public c(ih.c cVar) { this.f138247d = cVar; } public void onClick(DialogInterface dialogInterface, int i15) { ih.c cVar = this.f138247d; cVar.field_hadAlert = 1; cVar.field_brandFlag |= 4; o0.this.b(cVar, true); } } public class d implements DialogInterface.OnClickListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ ih.c f138249d; public d(ih.c cVar) { this.f138249d = cVar; } public void onClick(DialogInterface dialogInterface, int i15) { ih.c cVar = this.f138249d; cVar.field_hadAlert = 1; o0.this.b(cVar, false); } } public class e implements DialogInterface.OnClickListener { public e() { } public void onClick(DialogInterface dialogInterface, int i15) { o0.this.f(false); } } public class f implements DialogInterface.OnCancelListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ ur2.d f138252d; public f(ur2.d dVar) { this.f138252d = dVar; } public void onCancel(DialogInterface dialogInterface) { p3.e().d(this.f138252d); p3.e().p(1394, o0.this); } } public class g implements MenuItem.OnMenuItemClickListener { public g() { } public boolean onMenuItemClick(MenuItem menuItem) { o0 o0Var = o0.this; p64.n nVar = new p64.n((Context) o0Var.f138224d, 1, false); nVar.f281245i = new k0(o0Var); nVar.f281259q = new l0(o0Var); nVar.q(); return true; } } public class h implements MenuItem.OnMenuItemClickListener { public h() { } public boolean onMenuItemClick(MenuItem menuItem) { o0 o0Var = o0.this; p64.n nVar = new p64.n((Context) o0Var.f138224d, 1, false); nVar.f281245i = new k0(o0Var); nVar.f281259q = new l0(o0Var); nVar.q(); return true; } } public class i implements View.OnClickListener { public i() { } public void onClick(View view) { ArrayList arrayList = new ArrayList(); arrayList.add(view); Object[] array = arrayList.toArray(); arrayList.clear(); j30.a.b("com/tencent/mm/plugin/profile/ui/ContactWidgetBizInfo$9", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, array); o0 o0Var = o0.this; String str = o0.I; o0Var.e(); j30.a.g(this, "com/tencent/mm/plugin/profile/ui/ContactWidgetBizInfo$9", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V"); } } public o0(MMActivity mMActivity, String str, d40 d402) { this.f138224d = mMActivity; this.f138233p = str; this.f138234q = d402; } @Override // bg0.d0 public void D4(int i15, y yVar) { ih.c cVar = this.f138227g; if (cVar != null && cVar.x2() && yVar.getType() == 1354) { CheckBoxPreference checkBoxPreference = (CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo"); cg0.j jVar = w0.cO0().get(w0.cO0().Jn(this.f138227g.field_username)); if (jVar != null) { checkBoxPreference.S(!jVar.q2(4)); this.f138225e.notifyDataSetChanged(); return; } Log.w("MicroMsg.ContactWidgetBizInfo", "bizChatMyuser bizChatUserInfo is null after GetBizChatMyUserInfo"); } } @Override // gu3.a public boolean I(k14.g gVar, z1 z1Var, boolean z15, int i15) { boolean z16; boolean z17; boolean z18; if (z1Var != null) { z16 = true; } else { z16 = false; } Assert.assertTrue(z16); if (Util.nullAsNil(z1Var.getUsername()).length() > 0) { z17 = true; } else { z17 = false; } Assert.assertTrue(z17); if (gVar != null) { z18 = true; } else { z18 = false; } Assert.assertTrue(z18); this.f138225e = gVar; this.f138226f = z1Var; this.f138232o = z15; this.f138231n = i15; this.f138241x = this.f138224d.getIntent().getIntExtra("add_more_friend_search_scene", 0); this.E = (SnsAdClick) this.f138224d.getIntent().getParcelableExtra("KSnsAdTag"); this.D = this.f138224d.getIntent().getBundleExtra("Contact_Ext_Args"); this.F = this.f138224d.getIntent().getStringExtra("key_add_contact_report_info"); l(); String stringExtra = this.f138224d.getIntent().getStringExtra("Contact_BIZ_PopupInfoMsg"); if (!Util.isNullOrNil(stringExtra)) { this.f138224d.getIntent().putExtra("Contact_BIZ_PopupInfoMsg", ""); MMActivity mMActivity = this.f138224d; j.y(mMActivity, stringExtra, "", mMActivity.getString(R.string.f367559x1), null); } w0.WN0().c(z1Var.getUsername(), null); if (l.m(z1Var.getUsername())) { String username = z1Var.getUsername(); if (((w) yz3.j.c(w.class)).kL(username)) { w0.ZN0().h(username, this); String u25 = l.b(username).u2(); if (u25 != null) { w0.WN0().c(u25, null); } } else if (((w) yz3.j.c(w.class)).Zn(username)) { w0.fO0().Ie(username, this); String Se = w0.gO0().Se(username); if (Se != null) { w0.WN0().c(Se, null); } } } return true; } @Override // gu3.a public boolean a(String str) { int i15; Preference a15; c.b w25; String str2; int i16; int i17; int i18; if (str == null) { return false; } if (str.equals("contact_info_verifyuser_weibo")) { wr2.a aVar = new wr2.a(this.f138224d); z1 z1Var = this.f138226f; aVar.a(z1Var.f263311p0, z1Var.getUsername()); return true; } else if ("contact_info_biz_go_chatting".endsWith(str)) { if (this.E != null) { ReportAdClickEvent reportAdClickEvent = new ReportAdClickEvent(); SnsAdClick snsAdClick = this.E; snsAdClick.f79448g = 5; reportAdClickEvent.f64208d.f64209a = snsAdClick; reportAdClickEvent.publish(); } ih.c cVar = this.f138227g; if (cVar == null || (!cVar.m1() && !this.f138227g.x2())) { Intent intent = new Intent(); if (this.f138224d.getIntent().getBooleanExtra("key_start_biz_profile_from_app_brand_profile", false)) { intent.setFlags(268435456); } if (this.f138232o) { intent.putExtra("Chat_User", this.f138226f.getUsername()); intent.putExtra("Chat_Mode", 1); this.f138224d.setResult(-1, intent); } else { intent.putExtra("Chat_User", this.f138226f.getUsername()); intent.putExtra("Chat_Mode", 1); intent.putExtra("finish_direct", true); ((w1) ((dn.h) yz3.j.c(dn.h.class)).mU()).f(intent, this.f138224d); } } else { Intent intent2 = new Intent(); if (this.f138227g.x2()) { String u25 = this.f138227g.u2(); if (Util.isNullOrNil(u25)) { Log.w("MicroMsg.ContactWidgetBizInfo", "contact_info_biz_go_chatting fatherUserName is empty"); return false; } intent2.putExtra("enterprise_biz_name", u25); intent2.putExtra("enterprise_biz_display_name", ((hh2.j) yz3.j.c(hh2.j.class)).getDisplayName(u25)); } else { intent2.putExtra("enterprise_biz_name", this.f138226f.getUsername()); intent2.putExtra("enterprise_biz_display_name", ((hh2.j) yz3.j.c(hh2.j.class)).getDisplayName(this.f138226f.getUsername())); } intent2.addFlags(67108864); sv3.b.t(this.f138224d, ".ui.conversation.EnterpriseConversationUI", intent2, null); this.f138224d.finish(); } n(5, null); return true; } else if ("contact_info_biz_add".endsWith(str)) { if (((r21.d) z.q(r21.d.class)).b4()) { d(); } else { ((r21.d) z.q(r21.d.class)).yL(this.f138224d, new n0(this)); } int i19 = this.f138241x; if (i19 != 0) { q.INSTANCE.g(11263, Integer.valueOf(i19), this.f138226f.getUsername()); } return true; } else if ("contact_info_biz_read_msg_online".endsWith(str)) { return true; } else { if ("contact_info_stick_biz".equals(str)) { if (((CheckBoxPreference) this.f138225e.a("contact_info_stick_biz")).R()) { q.INSTANCE.g(13307, this.f138226f.getUsername(), 1, 1, 0, "", Integer.valueOf(this.f138231n)); r.a(this.f138226f.getUsername(), true); } else { nf0.w0.v0(this.f138226f.getUsername(), true); q.INSTANCE.g(13307, this.f138226f.getUsername(), 1, 2, 0, "", Integer.valueOf(this.f138231n)); } return true; } if ("contact_info_guarantee_info".equals(str) && this.f138230j.f() != null && !Util.isNullOrNil(this.f138230j.f().f233134d)) { Intent intent3 = new Intent(); intent3.putExtra("rawUrl", this.f138230j.f().f233134d); intent3.putExtra("useJs", true); intent3.putExtra("vertical_scroll", true); intent3.putExtra("geta8key_scene", 3); sv3.b.j(this.f138224d, "webview", ".ui.tools.WebViewUI", intent3, null); } if (str.startsWith("contact_info_bizinfo_external#") && (i16 = Util.getInt(str.replace("contact_info_bizinfo_external#", ""), -1)) >= 0 && i16 < this.f138228h.size()) { c.a aVar2 = this.f138228h.get(i16); String str3 = aVar2.f233083c; Intent intent4 = new Intent(); intent4.putExtra("rawUrl", str3); intent4.putExtra("useJs", true); intent4.putExtra("vertical_scroll", true); intent4.putExtra("geta8key_scene", 3); intent4.putExtra("KPublisherId", "brand_profile"); intent4.putExtra("prePublishId", "brand_profile"); if ((this.D != null && ((i18 = this.f138231n) == 39 || i18 == 56 || i18 == 35)) || (i17 = this.f138231n) == 87 || i17 == 89 || i17 == 85 || i17 == 88) { Bundle bundle = new Bundle(); bundle.putBoolean("KFromBizSearch", true); bundle.putBundle("KBizSearchExtArgs", this.D); intent4.putExtra("jsapiargs", bundle); int i25 = this.f138226f.z3() ? 7 : 6; int identifier = this.f138224d.getResources().getIdentifier(aVar2.f233082b, "string", this.f138224d.getPackageName()); String str4 = aVar2.f233081a; if (identifier > 0) { str4 = this.f138224d.getString(identifier); } n(i25, str4); } sv3.b.j(this.f138224d, "webview", ".ui.tools.WebViewUI", intent4, null); return true; } else if ("contact_info_subscribe_bizinfo".endsWith(str) || "contact_info_show_brand".endsWith(str) || "contact_info_locate".endsWith(str)) { ih.c cVar2 = this.f138227g; if (cVar2 == null) { return true; } if ("contact_info_subscribe_bizinfo".endsWith(str)) { if (!cVar2.z2()) { if (cVar2.F2()) { cVar2.field_brandFlag |= 1; if (this.f138230j == null) { this.f138230j = cVar2.w2(false); } c.b bVar = this.f138230j; if (bVar == null || !bVar.s()) { i15 = 1; this.f138225e.n("contact_info_template_recv", true); } else { sv3.b.g("brandservice"); this.f138225e.n("contact_info_template_recv", false); i15 = 1; } } else { i15 = 1; cVar2.field_brandFlag &= -2; this.f138225e.n("contact_info_template_recv", true); } q qVar = q.INSTANCE; Object[] objArr = new Object[6]; objArr[0] = cVar2.field_username; objArr[i15] = Integer.valueOf(i15); objArr[2] = Integer.valueOf(cVar2.F2() ? 3 : 4); objArr[3] = 0; objArr[4] = ""; objArr[5] = Integer.valueOf(this.f138231n); qVar.g(13307, objArr); } else if (cVar2.x2()) { p3.e().a(1363, this); ur2.c cVar3 = new ur2.c(cVar2.field_username, ((CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo")).R() ? 0 : 4, 4); p3.e().f(cVar3); MMActivity mMActivity = this.f138224d; this.G = j.Q(mMActivity, mMActivity.getString(R.string.f367625yv), this.f138224d.getString(R.string.f367656zq), true, true, new u0(this, cVar3)); } else if (cVar2.m1()) { bg0.j fO0 = w0.fO0(); String str5 = cVar2.field_username; boolean z15 = !((CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo")).R(); fO0.getClass(); ng ngVar = new ng(); ngVar.f30840d = str5; ngVar.f30843g = z15 ? 17 : 0; ngVar.f30841e = 0; v0 v0Var = new v0(ngVar, 17, 1, this); v0 v0Var2 = z.l().f198618b.g(v0Var, 0) ? v0Var : null; MMActivity mMActivity2 = this.f138224d; this.G = j.Q(mMActivity2, mMActivity2.getString(R.string.f367625yv), this.f138224d.getString(R.string.f367656zq), true, true, new v0(this, v0Var2)); } } else if ("contact_info_show_brand".endsWith(str)) { int i26 = cVar2.field_brandFlag; if ((i26 & 2) == 0) { cVar2.field_brandFlag = i26 | 2; } else { cVar2.field_brandFlag = i26 & -3; } } else if ("contact_info_locate".endsWith(str)) { if (cVar2.r2()) { cVar2.field_brandFlag &= -5; } else { MMActivity mMActivity3 = this.f138224d; j.u(mMActivity3, mMActivity3.getString(R.string.b18, this.f138226f.f()), this.f138224d.getString(R.string.f367625yv), new c(cVar2), new d(cVar2)); } } if (cVar2.x2() || cVar2.m1()) { return true; } b(cVar2, false); return true; } else if ("contact_info_verifyuser".endsWith(str)) { if (z1.T5(this.f138226f.getUsername()) && WeChatSomeFeatureSwitch.hardcodeWeChatUSTeam()) { return true; } if (nf0.w0.V()) { Log.i("MicroMsg.ContactWidgetBizInfo", "contact_info_verifyuser no click isWeChatUser."); return true; } ih.c cVar4 = this.f138227g; if (cVar4 == null || (w25 = cVar4.w2(false)) == null) { return true; } if (w25.n() == null || Util.isNullOrNil(w25.n().f233129d)) { str2 = (w25.h() == null || Util.isNullOrNil(w25.h().f233139b)) ? null : w25.h().f233139b; } else { str2 = w25.n().f233129d; } if (Util.isNullOrNil(str2)) { return true; } Intent intent5 = new Intent(); intent5.putExtra("rawUrl", str2); intent5.putExtra("useJs", true); intent5.putExtra("vertical_scroll", true); intent5.putExtra("geta8key_scene", 3); sv3.b.j(this.f138224d, "webview", ".ui.tools.WebViewUI", intent5, null); return true; } else if ("contact_info_trademark".endsWith(str)) { ih.c cVar5 = this.f138227g; if (cVar5 == null || cVar5.w2(false) == null || Util.isNullOrNil(cVar5.w2(false).m())) { return true; } Intent intent6 = new Intent(); intent6.putExtra("rawUrl", cVar5.w2(false).m()); intent6.putExtra("useJs", true); intent6.putExtra("vertical_scroll", true); intent6.putExtra("geta8key_scene", 3); sv3.b.j(this.f138224d, "webview", ".ui.tools.WebViewUI", intent6, null); return true; } else { if ("contact_is_mute".endsWith(str)) { boolean z16 = !this.f138235r; this.f138235r = z16; if (z16) { nf0.w0.j0(this.f138226f, true); } else { nf0.w0.s0(this.f138226f, true); } p(this.f138235r); } if ("enterprise_contact_info_enter".equals(str)) { if (this.f138224d == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "EnterEnterprise context is null"); } else if (this.f138227g == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "EnterEnterprise bizInfo is null"); } else { Intent intent7 = new Intent(); intent7.putExtra("enterprise_biz_name", this.f138227g.field_username); intent7.addFlags(67108864); sv3.b.j(this.f138224d, "brandservice", ".ui.EnterpriseBizContactListUI", intent7, null); } } if ("contact_info_biz_disable".equals(str)) { String string = this.f138224d.getString(R.string.c17); String string2 = this.f138224d.getString(R.string.c16); MMActivity mMActivity4 = this.f138224d; j.A(mMActivity4, string, "", string2, mMActivity4.getString(R.string.f367394sg), new e(), null); } if ("contact_info_biz_enable".equals(str)) { f(true); } if ("contact_info_template_recv".equals(str)) { Intent intent8 = new Intent(); intent8.putExtra("enterprise_biz_name", this.f138227g.field_username); sv3.b.j(this.f138224d, "brandservice", ".ui.ReceiveTemplateMsgMgrUI", intent8, null); } if ("contact_info_service_phone".equals(str) && (a15 = this.f138225e.a("contact_info_service_phone")) != null && a15.y() != null && !Util.isNullOrNil(a15.y().toString())) { String charSequence = a15.y().toString(); MMActivity mMActivity5 = this.f138224d; j.K(mMActivity5, true, charSequence, "", mMActivity5.getString(R.string.bd7), this.f138224d.getString(R.string.f367394sg), new p0(this, charSequence), null); } if ("contact_info_expose_btn".equals(str)) { e(); } if (str.equals("biz_placed_to_the_top")) { if (this.B == null) { this.B = this.f138224d.getSharedPreferences(this.f138224d.getPackageName() + "_preferences", 0); } z1 z1Var2 = this.f138226f; if (z1Var2 != null) { if (z1Var2.E3()) { this.f138226f.getUsername(); nf0.w0.v0(this.f138226f.getUsername(), true); this.B.edit().putBoolean("biz_placed_to_the_top", false).commit(); return true; } r.a(this.f138226f.getUsername(), true); this.f138226f.getUsername(); this.B.edit().putBoolean("biz_placed_to_the_top", true).commit(); return true; } } return true; } } } @Override // bg0.n.c public String a7() { return "MicroMsg.ContactWidgetBizInfo"; } public final void b(ih.c cVar, boolean z15) { CheckBoxPreference checkBoxPreference = (CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo"); CheckBoxPreference checkBoxPreference2 = (CheckBoxPreference) this.f138225e.a("contact_info_locate"); if3 if32 = new if3(); if32.f24875d = cVar.field_brandFlag; if32.f24876e = this.f138226f.getUsername(); if (j(this.f138231n)) { ((p) p3.b().B()).h(new kh2.n(58, if32)); } else { ((p) p3.b().B()).h(new kh2.n(47, if32)); } w0.gO0().update(cVar, new String[0]); checkBoxPreference.S(cVar.F2()); if (checkBoxPreference2 != null) { checkBoxPreference2.S(cVar.r2()); } if (z15) { l(); } } public boolean c() { if (this.f138224d.getIntent() == null) { return false; } String stringExtra = this.f138224d.getIntent().getStringExtra(TPDownloadProxyEnum.USER_DEVICE_ID); String stringExtra2 = this.f138224d.getIntent().getStringExtra("device_type"); ExDeviceCheckDeviceIsBoundEvent exDeviceCheckDeviceIsBoundEvent = new ExDeviceCheckDeviceIsBoundEvent(); ExDeviceCheckDeviceIsBoundEvent.a aVar = exDeviceCheckDeviceIsBoundEvent.f62278d; aVar.f62281b = stringExtra; aVar.f62280a = stringExtra2; exDeviceCheckDeviceIsBoundEvent.publish(); return exDeviceCheckDeviceIsBoundEvent.f62279e.f62282a; } public final void d() { if (this.f138224d.getIntent() != null && this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false)) { String stringExtra = this.f138224d.getIntent().getStringExtra("KHardDeviceBindTicket"); if (Util.isNullOrNil(stringExtra)) { Log.i("MicroMsg.ContactWidgetBizInfo", "bindTicket is null, means it is not switch from QRcode scan, just add contact"); } else if (!c()) { p3.e().a(536, this); ExDeviceBindHardDeviceEvent exDeviceBindHardDeviceEvent = new ExDeviceBindHardDeviceEvent(); ExDeviceBindHardDeviceEvent.a aVar = exDeviceBindHardDeviceEvent.f62263d; aVar.f62265a = stringExtra; aVar.f62267c = 1; exDeviceBindHardDeviceEvent.publish(); y yVar = exDeviceBindHardDeviceEvent.f62264e.f62269a; MMActivity mMActivity = this.f138224d; this.G = j.Q(mMActivity, mMActivity.getString(R.string.f367625yv), this.f138224d.getString(R.string.f367656zq), true, true, new a(yVar)); return; } } dv3.a aVar2 = new dv3.a(this.f138224d, new b()); LinkedList<Integer> linkedList = new LinkedList<>(); linkedList.add(Integer.valueOf(this.f138231n)); String str = this.f138236s; if (str != null) { aVar2.f203371p = str; } if (!Util.isNullOrNil(this.A)) { aVar2.f203372q = this.A; } aVar2.f203381z = true; aVar2.b(this.f138226f.getUsername(), linkedList, false, this.F); } public final void e() { z1 z1Var = this.f138226f; if (z1Var != null && !Util.isNullOrNil(z1Var.getUsername())) { Intent intent = new Intent(); intent.putExtra("rawUrl", String.format(I, this.f138226f.getUsername())); intent.putExtra("showShare", false); sv3.b.j(this.f138224d, "webview", ".ui.tools.WebViewUI", intent, null); } } public final void f(boolean z15) { ur2.d dVar = new ur2.d(this.f138227g.field_username, !z15); p3.e().a(1394, this); p3.e().f(dVar); MMActivity mMActivity = this.f138224d; this.G = j.Q(mMActivity, mMActivity.getString(R.string.f367625yv), this.f138224d.getString(R.string.f367656zq), true, true, new f(dVar)); } public final void g(m mVar) { System.currentTimeMillis(); o oVar = (o) ((yn.g) yz3.j.c(yn.g.class)).Ci(); if (oVar.Sa(mVar.field_openId) == null) { com.tencent.mm.modelavatar.n nVar = new com.tencent.mm.modelavatar.n(); nVar.f78487a = mVar.field_openId; nVar.f78490d = mVar.field_headImgUrl; nVar.f78492f = 0; nVar.f78488b = 3; oVar.sb(nVar); } ((com.tencent.mm.modelavatar.g) ((yn.g) yz3.j.c(yn.g.class)).DE()).b(mVar.field_openId); System.currentTimeMillis(); } public final String h(int i15) { if (i15 == 0) { return this.f138224d.getResources().getString(R.string.bjb); } if (i15 == 1) { return this.f138224d.getResources().getString(R.string.apa); } if (i15 == 2) { return this.f138224d.getResources().getString(R.string.apb); } Log.w("MicroMsg.ContactWidgetBizInfo", "getVerifyStr, error type %d", Integer.valueOf(i15)); return this.f138224d.getResources().getString(R.string.be6); } public final void i(boolean z15) { if (this.f138226f.u3()) { try { FrameLayout frameLayout = (FrameLayout) this.f138224d.findViewById(R.id.l2v); if (frameLayout == null) { return; } if (z15) { View findViewById = frameLayout.findViewById(R.id.cax); if (findViewById != null) { k30.a aVar = new k30.a(); ThreadLocal<k30.a> threadLocal = k30.c.f244265a; aVar.c(8); j30.a.d(findViewById, aVar.b(), "com/tencent/mm/plugin/profile/ui/ContactWidgetBizInfo", "hideExposeBtn", "(Z)V", "android/view/View_EXEC_", "setVisibility", "(I)V"); findViewById.setVisibility(((Integer) aVar.a(0)).intValue()); j30.a.e(findViewById, "com/tencent/mm/plugin/profile/ui/ContactWidgetBizInfo", "hideExposeBtn", "(Z)V", "android/view/View_EXEC_", "setVisibility", "(I)V"); return; } return; } if (frameLayout.findViewById(R.id.cax) == null) { LinearLayout linearLayout = (LinearLayout) t2.b(this.f138224d).inflate(R.layout.a0f, (ViewGroup) null); TextView textView = (TextView) linearLayout.findViewById(R.id.ccx); textView.setText(this.f138224d.getResources().getString(R.string.bdb)); textView.setTextColor(this.f138224d.getResources().getColor(R.color.f358157fp)); textView.setOnClickListener(new i()); frameLayout.addView(linearLayout); } frameLayout.setVisibility(0); this.f138225e.n("contact_info_expose_btn", true); } catch (Exception e15) { Log.e("MicroMsg.ContactWidgetBizInfo", "isShowExposeBtn Exception: " + e15.getMessage()); } } } public final boolean j(int i15) { return i15 == 81 || i15 == 92 || i15 == 93 || i15 == 94; } public final boolean k(String str) { try { long j15 = Util.getLong(str, 0); if (j15 <= 0 || j15 - (System.currentTimeMillis() / 1000) >= 0) { return false; } return true; } catch (Exception unused) { return false; } } /* JADX WARNING: Removed duplicated region for block: B:133:0x04f9 */ /* JADX WARNING: Removed duplicated region for block: B:134:0x0500 */ /* JADX WARNING: Removed duplicated region for block: B:156:0x058d */ /* JADX WARNING: Removed duplicated region for block: B:164:0x05d8 */ /* JADX WARNING: Removed duplicated region for block: B:184:0x0693 */ /* JADX WARNING: Removed duplicated region for block: B:225:0x07f6 */ /* JADX WARNING: Removed duplicated region for block: B:244:0x088a */ /* JADX WARNING: Removed duplicated region for block: B:265:0x0937 */ /* JADX WARNING: Removed duplicated region for block: B:271:0x0981 */ /* JADX WARNING: Removed duplicated region for block: B:328:0x0b20 */ /* JADX WARNING: Removed duplicated region for block: B:367:0x0c5d */ /* JADX WARNING: Removed duplicated region for block: B:381:0x0cbd */ /* JADX WARNING: Removed duplicated region for block: B:397:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:51:0x029b */ /* JADX WARNING: Removed duplicated region for block: B:52:0x02a8 */ /* JADX WARNING: Removed duplicated region for block: B:55:0x02b5 */ /* JADX WARNING: Removed duplicated region for block: B:58:0x02bf */ /* JADX WARNING: Removed duplicated region for block: B:73:0x031a */ /* JADX WARNING: Removed duplicated region for block: B:81:0x0341 */ /* JADX WARNING: Removed duplicated region for block: B:84:0x0361 */ /* JADX WARNING: Removed duplicated region for block: B:87:0x0388 */ public final void l() { String str; Boolean bool; c.b bVar; c.b bVar2; c.b bVar3; List<WxaAttributes.WxaEntryInfo> list; boolean z15; boolean z16; boolean z17; boolean z18; ih.c cVar; String str2; List<c.a> list2; int size; int i15; int d15; IndexOutOfBoundsException e15; boolean z19; c.b bVar4; JSONObject jSONObject; JSONObject jSONObject2; onDetach(); this.f138225e.removeAll(); this.f138225e.b(R.xml.f370522m); boolean z25 = this.f138240w; Boolean bool2 = Boolean.TRUE; if (z25) { this.f138225e.n("contact_info_time_expired", true); } ih.c b15 = l.b(this.f138226f.getUsername()); this.f138228h = null; this.f138230j = null; this.f138229i = null; if ((b15 == null || b15.w2(false) == null) && this.f138234q != null) { b15 = new ih.c(); b15.field_username = this.f138226f.getUsername(); d40 d402 = this.f138234q; b15.field_brandFlag = d402.f18974d; b15.field_brandIconURL = d402.f18977g; b15.field_brandInfo = d402.f18976f; b15.field_extInfo = d402.f18975e; } if (b15 != null && b15.field_brandInfo == null && b15.field_extInfo == null && this.f138234q != null) { b15.field_username = this.f138226f.getUsername(); d40 d403 = this.f138234q; b15.field_brandFlag = d403.f18974d; b15.field_brandIconURL = d403.f18977g; b15.field_brandInfo = d403.f18976f; b15.field_extInfo = d403.f18975e; } BizInfoHeaderPreference bizInfoHeaderPreference = (BizInfoHeaderPreference) this.f138225e.a("contact_info_header_bizinfo"); if (bizInfoHeaderPreference == null || Util.isNullOrNil(this.f138226f.getUsername())) { Log.w("MicroMsg.ContactWidgetBizInfo", "head pref is null"); this.f138225e.n("contact_info_header_bizinfo", true); } else { bizInfoHeaderPreference.R(this.f138226f, this.f138233p, b15); } this.f138225e.n("biz_placed_to_the_top", true); this.f138225e.n("contact_info_biz_enable", true); this.f138225e.n("contact_info_biz_disable", true); this.f138225e.n("contact_info_stick_biz", true); i(false); if (b15 != null) { if (b15.y2()) { bool = bool2; this.f138225e.n("contact_info_biz_add", true); str = "contact_info_biz_add"; this.f138225e.n("contact_info_expose_btn", true); i(true); this.f138225e.n("contact_is_mute", false); this.f138235r = nf0.w0.L(this.f138226f); if (b15.x2()) { this.f138225e.n("contact_info_biz_go_chatting", true); this.f138225e.n("contact_info_stick_biz", !this.f138226f.z3()); CheckBoxPreference checkBoxPreference = (CheckBoxPreference) this.f138225e.a("contact_info_stick_biz"); checkBoxPreference.S(this.f138226f.E3()); checkBoxPreference.O(R.string.f368010c14); q(); } else { this.f138225e.n("contact_info_subscribe_bizinfo", true); this.f138225e.n("contact_info_biz_go_chatting", true); if (b15.F2()) { this.f138225e.n("contact_info_biz_enable", true); this.f138225e.n("contact_info_biz_disable", false); this.f138225e.a("contact_info_biz_disable").O(R.string.c16); this.f138225e.n("contact_is_mute", false); this.f138225e.n("biz_placed_to_the_top", false); CheckBoxPreference checkBoxPreference2 = (CheckBoxPreference) this.f138225e.a("biz_placed_to_the_top"); this.C = checkBoxPreference2; checkBoxPreference2.O(R.string.c1m); q(); if (b15.A2()) { this.f138225e.n("contact_info_locate", true); } } else { this.f138225e.n("contact_info_biz_enable", false); this.f138225e.n("contact_info_biz_disable", true); ((ButtonPreference) this.f138225e.a("contact_info_biz_enable")).S(this.f138224d.getResources().getString(R.string.c18), this.f138224d.getResources().getColor(R.color.f358157fp)); this.f138225e.n("contact_is_mute", true); this.f138225e.n("biz_placed_to_the_top", true); this.f138225e.n("contact_info_locate", true); } } p(this.f138235r); } else { bool = bool2; str = "contact_info_biz_add"; if (b15.m1()) { this.f138225e.n("contact_info_locate", true); this.f138225e.n("contact_info_subscribe_bizinfo", false); this.f138225e.n("enterprise_contact_info_enter", false); ((ButtonPreference) this.f138225e.a("contact_info_biz_go_chatting")).S(this.f138224d.getResources().getString(R.string.c19), this.f138224d.getResources().getColor(R.color.f358157fp)); this.f138225e.n("contact_info_stick_biz", !this.f138226f.z3()); CheckBoxPreference checkBoxPreference3 = (CheckBoxPreference) this.f138225e.a("contact_info_stick_biz"); checkBoxPreference3.S(this.f138226f.E3()); checkBoxPreference3.O(R.string.c1b); q(); this.f138225e.n("contact_is_mute", false); boolean L = nf0.w0.L(this.f138226f); this.f138235r = L; p(L); } else { this.f138225e.n("contact_info_stick_biz", z1.J5(this.f138226f.getUsername()) || !this.f138226f.z3()); ((CheckBoxPreference) this.f138225e.a("contact_info_stick_biz")).S(this.f138226f.E3()); this.f138225e.n("contact_is_mute", true); z19 = false; this.f138235r = false; this.f138227g = b15; this.f138228h = b15.s2(); c.b w25 = b15.w2(z19); this.f138230j = w25; this.f138229i = w25.p(); if (!this.f138230j.q()) { this.f138225e.a("near_field_service").L(R.string.l_8); } else { this.f138225e.n("near_field_service", true); } bVar4 = this.f138230j; jSONObject = bVar4.f233085a; if (jSONObject != null) { bVar4.f233090f = jSONObject.optString("ConferenceContactExpireTime"); } if (bVar4.f233090f == null) { this.f138238u = true; c.b bVar5 = this.f138230j; JSONObject jSONObject3 = bVar5.f233085a; if (jSONObject3 != null) { bVar5.f233090f = jSONObject3.optString("ConferenceContactExpireTime"); } if (!k(bVar5.f233090f)) { this.f138225e.n("contact_info_time_expired", true); } else { this.f138237t = true; if (!this.f138226f.z3()) { Log.w("MicroMsg.ContactWidgetBizInfo", "expireTime not null, and %s is not my contact", this.f138226f.getUsername()); m(); } else { this.f138225e.n("contact_info_time_expired", true); } } if (z1.u5(this.f138226f.getUsername()) || nf0.w0.W(this.f138226f.getUsername())) { m(); } } else { this.f138225e.n("contact_info_time_expired", true); } if (this.f138230j.o() != null && this.f138230j.o().length() > 0) { this.f138236s = this.f138230j.o(); } c.b bVar6 = this.f138230j; jSONObject2 = bVar6.f233085a; if (jSONObject2 != null) { bVar6.f233087c = "1".equals(jSONObject2.optString("IsShowMember")); } this.f138239v = bVar6.f233087c; if (Util.isNullOrNil(this.f138230j.i())) { this.f138225e.n("contact_info_service_phone", false); Preference a15 = this.f138225e.a("contact_info_service_phone"); if (a15 != null) { a15.M(this.f138230j.i()); a15.f177774z = this.f138224d.getResources().getColor(R.color.f358734vo); } } else { this.f138225e.n("contact_info_service_phone", true); } } } z19 = false; this.f138227g = b15; this.f138228h = b15.s2(); c.b w252 = b15.w2(z19); this.f138230j = w252; this.f138229i = w252.p(); if (!this.f138230j.q()) { } bVar4 = this.f138230j; jSONObject = bVar4.f233085a; if (jSONObject != null) { } if (bVar4.f233090f == null) { } this.f138236s = this.f138230j.o(); c.b bVar62 = this.f138230j; jSONObject2 = bVar62.f233085a; if (jSONObject2 != null) { } this.f138239v = bVar62.f233087c; if (Util.isNullOrNil(this.f138230j.i())) { } } else { bool = bool2; str = "contact_info_biz_add"; this.f138225e.n("contact_info_time_expired", true); Log.e("MicroMsg.ContactWidgetBizInfo", "get biz info from storage, but return null"); } if (!Util.isNullOrNil(this.f138226f.U)) { KeyValuePreference keyValuePreference = (KeyValuePreference) this.f138225e.a("contact_info_user_desc"); if (keyValuePreference != null) { if (Util.nullAsNil(this.f138226f.U).trim().length() <= 0) { this.f138225e.n("contact_info_user_desc", true); } else { keyValuePreference.N = false; keyValuePreference.Q = this.f138224d.getString(R.string.be6); keyValuePreference.M(((hz.h) yz3.j.c(hz.h.class)).g2(this.f138224d, this.f138226f.U)); keyValuePreference.Q(false); Log.i("MicroMsg.ContactWidgetBizInfo", "verify bmp is null ? %B", bool); keyValuePreference.X = null; keyValuePreference.V = 8; keyValuePreference.K(8); if (z1.T5(this.f138226f.getUsername()) && WeChatSomeFeatureSwitch.hardcodeWeChatUSTeam()) { keyValuePreference.M(((hz.h) yz3.j.c(hz.h.class)).g2(this.f138224d, m6.f.a())); } } } } else { Log.w("MicroMsg.ContactWidgetBizInfo", "has not desc info"); this.f138225e.n("contact_info_user_desc", true); if (!this.f138237t) { this.f138225e.n("contact_info_time_expired", true); } } c.b bVar7 = this.f138230j; if (bVar7 == null || bVar7.n() == null || Util.isNullOrNil(this.f138230j.n().f233127b)) { c.b bVar8 = this.f138230j; if (bVar8 == null || bVar8.h() == null || Util.isNullOrNil(this.f138230j.h().f233138a)) { Log.w("MicroMsg.ContactWidgetBizInfo", "has not verify info"); this.f138225e.n("contact_info_verifyuser", true); } else { KeyValuePreference keyValuePreference2 = (KeyValuePreference) this.f138225e.a("contact_info_verifyuser"); if (keyValuePreference2 != null) { keyValuePreference2.M(this.f138230j.h().f233138a); if (z1.T5(this.f138226f.getUsername()) && WeChatSomeFeatureSwitch.hardcodeWeChatUSTeam()) { keyValuePreference2.M(((hz.h) yz3.j.c(hz.h.class)).g2(this.f138224d, m6.r("OfficialEntity"))); keyValuePreference2.K(8); } } } } else { c.b.e n15 = this.f138230j.n(); KeyValuePreference keyValuePreference3 = (KeyValuePreference) this.f138225e.a("contact_info_verifyuser"); if (keyValuePreference3 != null) { keyValuePreference3.N = false; if (Util.isNullOrNil(n15.f233128c)) { keyValuePreference3.Q = h(n15.f233126a); } else { keyValuePreference3.Q = n15.f233128c; } Log.i("MicroMsg.ContactWidgetBizInfo", "verify bmp is null ? %B", bool); keyValuePreference3.X = null; if (n15.f233127b != null) { String str3 = n15.f233130e; SpannableString g25 = ((hz.h) yz3.j.c(hz.h.class)).g2(this.f138224d, n15.f233127b.trim()); if (!Util.isNullOrNil(str3)) { try { SpannableString spannableString = new SpannableString(str3 + " " + ((Object) g25)); try { spannableString.setSpan(new ForegroundColorSpan(-36352), 0, str3.length(), 17); g25 = spannableString; } catch (IndexOutOfBoundsException e16) { e15 = e16; g25 = spannableString; Log.e("MicroMsg.ContactWidgetBizInfo", "verifySummary setSpan error: %s", e15.getMessage()); keyValuePreference3.M(g25); if (nf0.w0.V()) { } bVar = this.f138230j; if (bVar != null) { } Log.w("MicroMsg.ContactWidgetBizInfo", "has not trademark info"); this.f138225e.n("contact_info_trademark", true); bVar2 = this.f138230j; if (bVar2 != null) { } this.f138225e.n("contact_info_privilege", true); int d16 = this.f138225e.d("contact_info_category2"); size = this.f138228h.size() - 1; while (size >= 0) { } if (!this.f138237t) { } this.f138225e.n("contact_info_verifyuser_weibo", true); bVar3 = this.f138230j; if (bVar3 != null) { } this.f138225e.n("contact_info_reputation", true); this.f138225e.n("contact_info_guarantee_info", true); this.f138225e.n("contact_info_scope_of_business", true); list = this.f138229i; if (list != null) { } this.f138225e.n("contact_info_bindwxainfo", true); o(this.f138224d.getIntent().getStringExtra("Contact_BIZ_KF_WORKER_ID")); this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false); if (this.f138224d.getIntent() != null) { } if (!this.f138226f.z3()) { } if (z1.T5(this.f138226f.getUsername())) { } } } catch (IndexOutOfBoundsException e17) { e15 = e17; Log.e("MicroMsg.ContactWidgetBizInfo", "verifySummary setSpan error: %s", e15.getMessage()); keyValuePreference3.M(g25); if (nf0.w0.V()) { } bVar = this.f138230j; if (bVar != null) { } Log.w("MicroMsg.ContactWidgetBizInfo", "has not trademark info"); this.f138225e.n("contact_info_trademark", true); bVar2 = this.f138230j; if (bVar2 != null) { } this.f138225e.n("contact_info_privilege", true); int d162 = this.f138225e.d("contact_info_category2"); size = this.f138228h.size() - 1; while (size >= 0) { } if (!this.f138237t) { } this.f138225e.n("contact_info_verifyuser_weibo", true); bVar3 = this.f138230j; if (bVar3 != null) { } this.f138225e.n("contact_info_reputation", true); this.f138225e.n("contact_info_guarantee_info", true); this.f138225e.n("contact_info_scope_of_business", true); list = this.f138229i; if (list != null) { } this.f138225e.n("contact_info_bindwxainfo", true); o(this.f138224d.getIntent().getStringExtra("Contact_BIZ_KF_WORKER_ID")); this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false); if (this.f138224d.getIntent() != null) { } if (!this.f138226f.z3()) { } if (z1.T5(this.f138226f.getUsername())) { } } } keyValuePreference3.M(g25); } else { Log.e("MicroMsg.ContactWidgetBizInfo", "[arthurdan.emojiSpan] Notice!!!! extInfo.verifyInfo.verifySourceDescription is null"); } if (nf0.w0.V()) { keyValuePreference3.K(8); } else if (z1.T5(this.f138226f.getUsername()) && WeChatSomeFeatureSwitch.hardcodeWeChatUSTeam()) { keyValuePreference3.M(m6.r("OfficialEntity")); keyValuePreference3.K(8); } } else { this.f138225e.n("contact_info_verifyuser", true); } } bVar = this.f138230j; if (bVar != null || Util.isNullOrNil(bVar.l())) { Log.w("MicroMsg.ContactWidgetBizInfo", "has not trademark info"); this.f138225e.n("contact_info_trademark", true); } else { KeyValuePreference keyValuePreference4 = (KeyValuePreference) this.f138225e.a("contact_info_trademark"); if (keyValuePreference4 != null) { keyValuePreference4.N = false; Log.i("MicroMsg.ContactWidgetBizInfo", "trademark bmp is null ? %B", bool); keyValuePreference4.X = null; keyValuePreference4.M(this.f138230j.l()); this.f138230j.l(); this.f138230j.m(); } } bVar2 = this.f138230j; if (bVar2 != null || bVar2.g() == null || this.f138230j.g().size() <= 0) { this.f138225e.n("contact_info_privilege", true); } else { KeyValuePreference keyValuePreference5 = (KeyValuePreference) this.f138225e.a("contact_info_privilege"); keyValuePreference5.Q(false); ((LinkedList) keyValuePreference5.Z).clear(); for (Iterator<c.b.g> it = this.f138230j.g().iterator(); it.hasNext(); it = it) { c.b.g next = it.next(); LinearLayout linearLayout = (LinearLayout) View.inflate(this.f138224d, R.layout.bms, null); ((ImageView) linearLayout.findViewById(R.id.h9o)).setImageDrawable(new js2.c(this.f138224d.getResources(), next.f233135a)); String str4 = next.f233136b; int identifier = this.f138224d.getResources().getIdentifier(next.f233137c, "string", this.f138224d.getPackageName()); if (identifier > 0) { str4 = this.f138224d.getString(identifier); } ((TextView) linearLayout.findViewById(R.id.ns9)).setText(str4); ((LinkedList) keyValuePreference5.Z).add(linearLayout); } } int d1622 = this.f138225e.d("contact_info_category2"); if (d1622 >= 0 && (list2 = this.f138228h) != null && list2.size() > 0) { size = this.f138228h.size() - 1; while (size >= 0) { if (this.f138228h.get(size) != null && ((!this.f138224d.getString(R.string.bch).equals(this.f138228h.get(size).f233081a) || this.f138239v) && (!Util.isNullOrNil(this.f138228h.get(size).f233081a) || !Util.isNullOrNil(this.f138228h.get(size).f233082b)))) { Preference preference = new Preference(this.f138224d); preference.I("contact_info_bizinfo_external#" + size); String str5 = this.f138228h.get(size).f233081a; i15 = d1622; int identifier2 = this.f138224d.getResources().getIdentifier(this.f138228h.get(size).f233082b, "string", this.f138224d.getPackageName()); if (identifier2 > 0) { str5 = this.f138224d.getString(identifier2); } if (z1.T5(this.f138226f.getUsername()) && str5.equals(this.f138224d.getString(R.string.__mp_wording__brandinfo_history_massmsg))) { this.f138225e.n(preference.v(), true); } if (this.f138227g.z2() && ("__mp_wording__brandinfo_history_massmsg".equals(this.f138228h.get(size).f233082b) || str5.equals(this.f138224d.getString(R.string.__mp_wording__brandinfo_history_massmsg)))) { str5 = this.f138224d.getString(R.string.f368007c11); } preference.P(str5); if (!Util.isNullOrNil(this.f138228h.get(size).f233084d)) { preference.M(this.f138228h.get(size).f233084d); } int i16 = (!Util.nullAsNil(this.f138228h.get(size).f233082b).equals("__mp_wording__brandinfo_feedback") || (d15 = this.f138225e.d("contact_info_scope_of_business")) <= 0) ? i15 : d15 + 1; this.f138225e.h(preference, i16); if (Util.nullAsNil(this.f138228h.get(size).f233082b).equals("__mp_wording__brandinfo_biz_detail")) { this.f138225e.h(new PreferenceSmallCategory(this.f138224d), i16); } } else { i15 = d1622; } size--; d1622 = i15; } } if (!this.f138237t) { z1 z1Var = this.f138226f; Set<String> set = nf0.w0.f270844a; if (((z1Var.O2() & 1) != 0) && this.f138226f.N2() != null && !this.f138226f.N2().equals("")) { KeyValuePreference keyValuePreference6 = (KeyValuePreference) this.f138225e.a("contact_info_verifyuser_weibo"); if (keyValuePreference6 != null) { StringBuilder sb5 = new StringBuilder(); sb5.append(Util.nullAs(this.f138226f.P2(), "")); MMActivity mMActivity = this.f138224d; Object[] objArr = new Object[1]; String N2 = this.f138226f.N2(); if (nf0.w0.T(N2)) { str2 = N2.replace("http://t.qq.com/", "").replace("t.qq.com/", ""); } else { str2 = ""; } objArr[0] = str2; sb5.append(mMActivity.getString(R.string.iy6, objArr)); keyValuePreference6.M(sb5.toString()); keyValuePreference6.N(gy3.a.d(this.f138224d, R.color.f358734vo)); keyValuePreference6.Q(false); } bVar3 = this.f138230j; if (bVar3 != null || bVar3.f() == null) { this.f138225e.n("contact_info_reputation", true); this.f138225e.n("contact_info_guarantee_info", true); this.f138225e.n("contact_info_scope_of_business", true); } else { BizInfoPayInfoIconPreference bizInfoPayInfoIconPreference = (BizInfoPayInfoIconPreference) this.f138225e.a("contact_info_reputation"); if (this.f138230j.f().f233131a > 0) { int i17 = this.f138230j.f().f233131a; if (i17 != bizInfoPayInfoIconPreference.P) { bizInfoPayInfoIconPreference.P = i17; bizInfoPayInfoIconPreference.R(); } } else { this.f138225e.n("contact_info_reputation", true); } BizInfoPayInfoIconPreference bizInfoPayInfoIconPreference2 = (BizInfoPayInfoIconPreference) this.f138225e.a("contact_info_guarantee_info"); if (this.f138230j.f().f233133c == null || ((ArrayList) this.f138230j.f().f233133c).size() <= 0) { this.f138225e.n("contact_info_guarantee_info", true); } else { bizInfoPayInfoIconPreference2.N = this.f138230j.f().f233133c; bizInfoPayInfoIconPreference2.R(); } KeyValuePreference keyValuePreference7 = (KeyValuePreference) this.f138225e.a("contact_info_scope_of_business"); if (!Util.isNullOrNil(this.f138230j.f().f233132b)) { keyValuePreference7.M(this.f138230j.f().f233132b); keyValuePreference7.R(4); keyValuePreference7.Q(false); } else { this.f138225e.n("contact_info_scope_of_business", true); } } list = this.f138229i; if (list != null || list.size() <= 0) { this.f138225e.n("contact_info_bindwxainfo", true); } else { this.f138225e.n("contact_info_bindwxainfo", false); ((BizBindWxaInfoPreference) this.f138225e.a("contact_info_bindwxainfo")).Q(this.f138227g, this.f138229i); } o(this.f138224d.getIntent().getStringExtra("Contact_BIZ_KF_WORKER_ID")); this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false); if (this.f138224d.getIntent() != null || !this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false)) { if (!this.f138226f.z3()) { if (b15 != null) { CheckBoxPreference checkBoxPreference4 = (CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo"); CheckBoxPreference checkBoxPreference5 = (CheckBoxPreference) this.f138225e.a("contact_info_locate"); if (b15.x2()) { checkBoxPreference4.O(R.string.c15); cg0.j jVar = w0.cO0().get(w0.cO0().Jn(b15.field_username)); if (jVar != null) { checkBoxPreference4.S(!jVar.q2(4)); } else { Log.w("MicroMsg.ContactWidgetBizInfo", "bizChatMyuser bizChatUserInfo is null"); } } else if (b15.m1()) { checkBoxPreference4.O(R.string.c1c); checkBoxPreference4.S(!w0.fO0().te(b15.field_username)); } else { checkBoxPreference4.S(b15.F2()); } if (b15.F2()) { if (this.f138230j == null) { this.f138230j = b15.v2(); } c.b bVar9 = this.f138230j; if (bVar9 == null || !bVar9.s()) { z16 = true; this.f138225e.n("contact_info_template_recv", true); } else { sv3.b.g("brandservice"); this.f138225e.n("contact_info_template_recv", false); z16 = true; } } else { z16 = true; this.f138225e.n("contact_info_template_recv", true); } if (b15.v2().r()) { checkBoxPreference5.S(b15.r2()); } else { this.f138225e.n("contact_info_locate", z16); checkBoxPreference5.S(b15.r2()); } } else { z16 = true; this.f138225e.n("contact_info_subscribe_bizinfo", true); this.f138225e.n("contact_info_locate", true); this.f138225e.n("contact_info_template_recv", true); } this.f138225e.n("contact_info_biz_read_msg_online", z16); this.f138225e.n(str, z16); String f15 = this.f138226f.f(); if (f15 != null) { this.f138224d.setMMTitle(f15); } if (z1.J5(this.f138226f.getUsername())) { ButtonPreference buttonPreference = (ButtonPreference) this.f138225e.a("contact_info_biz_go_chatting"); buttonPreference.T(true); buttonPreference.S(this.f138224d.getResources().getString(R.string.bgx), this.f138224d.getResources().getColor(R.color.f358157fp)); this.f138224d.setMMTitle(R.string.biz); } if (!z1.u5(this.f138226f.getUsername()) && this.f138227g != null) { this.f138224d.addIconOptionMenu(0, R.raw.icons_outlined_more, new h()); } } else { Log.w("MicroMsg.ContactWidgetBizInfo", "%s is not my contact", this.f138226f.getUsername()); this.f138224d.setMMTitle(""); m(); Preference a16 = this.f138225e.a(str); if (a16 != null && this.f138238u) { a16.O(R.string.f367898bc4); } if (j(this.f138231n)) { if (b15 == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "bizinfo is null in temp session"); } else { ((CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo")).S(b15.F2()); z15 = false; this.f138225e.n("contact_info_subscribe_bizinfo", false); this.f138224d.showOptionMenu(z15); } } z15 = false; this.f138224d.showOptionMenu(z15); } if (z1.T5(this.f138226f.getUsername()) && nf0.w0.V()) { this.f138225e.n("contact_info_user_desc", true); this.f138225e.n("contact_info_verifyuser", true); return; } } boolean c15 = c(); this.f138226f.getClass(); if (!this.f138226f.z3() || !c15) { Log.w("MicroMsg.ContactWidgetBizInfo", "%s is not my hard biz contact", this.f138226f.getUsername()); m(); Preference a17 = this.f138225e.a(str); if (a17 != null) { if (c15) { a17.O(R.string.f367898bc4); } else { a17.O(R.string.bbt); } } if (j(this.f138231n)) { if (b15 == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "bizinfo is null in temp session"); } else { ((CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo")).S(b15.F2()); z17 = false; this.f138225e.n("contact_info_subscribe_bizinfo", false); this.f138224d.showOptionMenu(z17); return; } } z17 = false; this.f138224d.showOptionMenu(z17); return; } if (b15 != null) { CheckBoxPreference checkBoxPreference6 = (CheckBoxPreference) this.f138225e.a("contact_info_subscribe_bizinfo"); CheckBoxPreference checkBoxPreference7 = (CheckBoxPreference) this.f138225e.a("contact_info_locate"); if (b15.x2()) { cg0.j jVar2 = w0.cO0().get(w0.cO0().Jn(b15.field_username)); if (jVar2 != null) { checkBoxPreference6.S(!jVar2.q2(4)); } else { Log.w("MicroMsg.ContactWidgetBizInfo", "bizChatMyuser bizChatUserInfo is null"); } } else { checkBoxPreference6.S(b15.F2()); } if (b15.F2()) { if (this.f138230j == null) { this.f138230j = b15.v2(); } c.b bVar10 = this.f138230j; if (bVar10 == null || !bVar10.s()) { z18 = true; this.f138225e.n("contact_info_template_recv", true); } else { sv3.b.g("brandservice"); this.f138225e.n("contact_info_template_recv", false); z18 = true; } } else { z18 = true; this.f138225e.n("contact_info_template_recv", true); } if (b15.v2().r()) { checkBoxPreference7.S(b15.r2()); } else { this.f138225e.n("contact_info_locate", z18); checkBoxPreference7.S(b15.r2()); } } else { z18 = true; this.f138225e.n("contact_info_subscribe_bizinfo", true); this.f138225e.n("contact_info_locate", true); this.f138225e.n("contact_info_template_recv", true); } this.f138225e.n("contact_info_biz_read_msg_online", z18); this.f138225e.n(str, z18); String f16 = this.f138226f.f(); if (f16 != null) { this.f138224d.setMMTitle(f16); } if (z1.J5(this.f138226f.getUsername())) { ((ButtonPreference) this.f138225e.a("contact_info_biz_go_chatting")).S(this.f138224d.getResources().getString(R.string.bgx), this.f138224d.getResources().getColor(R.color.f358157fp)); this.f138224d.setMMTitle(R.string.biz); } if (!(z1.u5(this.f138226f.getUsername()) || (cVar = this.f138227g) == null || cVar.y2())) { this.f138224d.addIconOptionMenu(0, R.raw.icons_outlined_more, new g()); return; } return; } } this.f138225e.n("contact_info_verifyuser_weibo", true); bVar3 = this.f138230j; if (bVar3 != null) { } this.f138225e.n("contact_info_reputation", true); this.f138225e.n("contact_info_guarantee_info", true); this.f138225e.n("contact_info_scope_of_business", true); list = this.f138229i; if (list != null) { } this.f138225e.n("contact_info_bindwxainfo", true); o(this.f138224d.getIntent().getStringExtra("Contact_BIZ_KF_WORKER_ID")); this.f138224d.getIntent().getBooleanExtra("KIsHardDevice", false); if (this.f138224d.getIntent() != null) { } if (!this.f138226f.z3()) { } if (z1.T5(this.f138226f.getUsername())) { } } public final void m() { z1 z1Var = this.f138226f; if (z1Var == null || !z1Var.z3() || z1.J5(this.f138226f.getUsername()) || nf0.w0.W(this.f138226f.getUsername())) { this.f138225e.n("contact_is_mute", true); z1 z1Var2 = this.f138226f; if (z1Var2 == null || z1Var2.z3() || !j(this.f138231n)) { this.f138225e.n("contact_info_expose_btn", true); i(true); } else { this.f138225e.n("contact_info_expose_btn", false); i(false); } } else { this.f138225e.n("contact_is_mute", false); } this.f138225e.n("contact_info_verifyuser_weibo", true); this.f138225e.n("contact_info_subscribe_bizinfo", true); this.f138225e.n("contact_info_template_recv", true); this.f138225e.n("contact_info_locate", true); if (!this.f138237t) { this.f138225e.n("contact_info_time_expired", true); } else { this.f138225e.n("contact_info_biz_add", true); } z1 z1Var3 = this.f138226f; if (z1Var3 == null || ((!z1.u5(z1Var3.getUsername()) && !nf0.w0.W(this.f138226f.getUsername())) || !this.f138226f.z3())) { this.f138225e.n("contact_info_biz_go_chatting", true); } else { this.f138225e.n("contact_info_biz_go_chatting", false); } if (nf0.w0.W(this.f138226f.getUsername())) { this.f138225e.n("contact_info_user_desc", true); } } public final void n(int i15, String str) { String str2; Bundle bundle = this.D; if (bundle != null) { int i16 = this.f138231n; if (i16 != 39 && i16 != 56 && i16 != 35 && i16 != 87 && i16 != 88 && i16 != 89 && i16 != 85) { return; } if (this.f138226f == null) { Log.i("MicroMsg.ContactWidgetBizInfo", "contact is null."); return; } String string = bundle.getString("Contact_Ext_Args_Search_Id"); String nullAsNil = Util.nullAsNil(this.D.getString("Contact_Ext_Args_Query_String")); int i17 = this.D.getInt("Contact_Ext_Args_Index"); int i18 = 0; int i19 = this.f138231n; if (i19 == 35) { i18 = 1; } else if (i19 != 85) { switch (i19) { case 87: i18 = 2; break; case 88: i18 = 3; break; case 89: i18 = 4; break; } } else { i18 = 5; } String nullAsNil2 = Util.nullAsNil(this.D.getString("Contact_Ext_Extra_Params")); String str3 = nullAsNil + "," + i15 + "," + Util.nullAsNil(this.f138226f.getUsername()) + "," + i17 + "," + (System.currentTimeMillis() / 1000) + "," + string + "," + i18; if (!Util.isNullOrNil(str)) { str2 = str3 + "," + str + "," + nullAsNil2; } else { str2 = str3 + ",," + nullAsNil2; } q.INSTANCE.kvStat(10866, str2); } } @Override // bg0.n.c public void n5(LinkedList<nu5> linkedList) { w0.hO0().e(this); if (this.f138225e == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "onKFSceneEnd, screen is null"); } else if (this.f138226f == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "onKFSceneEnd, contact is null"); } else if (linkedList == null || linkedList.size() <= 0) { Log.w("MicroMsg.ContactWidgetBizInfo", "onKFSceneEnd, worker is null"); } else { if (!Util.isNullOrNil(this.f138242y)) { Iterator<nu5> it = linkedList.iterator(); while (it.hasNext()) { nu5 next = it.next(); String str = next.f31342d; if (str != null && str.equals(this.f138242y)) { this.f138225e.n("contact_info_kf_worker", false); this.f138225e.a("contact_info_kf_worker").M(next.f31344f); return; } } } this.f138225e.n("contact_info_kf_worker", false); Preference a15 = this.f138225e.a("contact_info_kf_worker"); if (a15 != null && linkedList.get(0) != null) { a15.M(linkedList.get(0).f31344f); } } } public final void o(String str) { boolean z15; if (!this.f138243z) { this.f138242y = str; c.b bVar = this.f138230j; if (bVar != null) { JSONObject jSONObject = bVar.f233085a; if (jSONObject != null) { bVar.f233109y = jSONObject.optInt("FunctionFlag"); } int i15 = bVar.f233109y; IAutoDBItem.MAutoDBInfo mAutoDBInfo = ih.c.f233078y0; if ((i15 & 1) > 0) { z15 = true; } else { z15 = false; } if (z15 && this.f138226f != null) { if (Util.isNullOrNil(str)) { m fb5 = w0.iO0().fb(this.f138226f.getUsername()); if (fb5 == null) { this.f138225e.n("contact_info_kf_worker", true); w0.hO0().a(this); w0.hO0().c(this.f138226f.getUsername(), u0.r()); this.f138243z = true; return; } this.f138225e.n("contact_info_kf_worker", false); IconWidgetPreference iconWidgetPreference = (IconWidgetPreference) this.f138225e.a("contact_info_kf_worker"); iconWidgetPreference.M(fb5.field_nickname); Bitmap Yg0 = ((yn.i) yz3.j.c(yn.i.class)).Yg0(fb5.field_openId); if (Yg0 == null) { g(fb5); MMHandlerThread.postToMainThreadDelayed(new t0(this, fb5.field_openId), 2000); return; } iconWidgetPreference.Q(Yg0); return; } bg0.o iO0 = w0.iO0(); m Sa = iO0.Sa(str); if (Sa == null || iO0.sb(Sa)) { w0.hO0().a(this); w0.hO0().d(this.f138226f.getUsername(), str, 1); this.f138243z = true; } if (Sa == null) { Sa = iO0.fb(this.f138226f.getUsername()); } if (Sa == null) { this.f138225e.n("contact_info_kf_worker", true); return; } this.f138225e.n("contact_info_kf_worker", false); IconWidgetPreference iconWidgetPreference2 = (IconWidgetPreference) this.f138225e.a("contact_info_kf_worker"); iconWidgetPreference2.M(Sa.field_nickname); Bitmap Yg02 = ((yn.i) yz3.j.c(yn.i.class)).Yg0(Sa.field_openId); if (Yg02 == null) { g(Sa); MMHandlerThread.postToMainThreadDelayed(new t0(this, Sa.field_openId), 2000); return; } iconWidgetPreference2.Q(Yg02); return; } } this.f138225e.n("contact_info_kf_worker", true); } } @Override // gu3.a public void onActivityResult(int i15, int i16, Intent intent) { if (this.f138224d == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "null == context"); return; } Log.i("MicroMsg.ContactWidgetBizInfo", "onActivityResult, requestCode = %d, resultCode = %d", Integer.valueOf(i15), Integer.valueOf(i16)); if (i15 == 1 && i16 == -1 && intent != null) { String stringExtra = intent.getStringExtra("be_send_card_name"); String stringExtra2 = intent.getStringExtra("received_card_name"); boolean booleanExtra = intent.getBooleanExtra("Is_Chatroom", false); String stringExtra3 = intent.getStringExtra("custom_send_text"); hh2.n.a().lh0(stringExtra, stringExtra2, booleanExtra); hh2.n.a().kv(stringExtra3, stringExtra2); MMActivity mMActivity = this.f138224d; com.tencent.mm.ui.widget.snackbar.b.a(mMActivity, mMActivity.getString(R.string.f_p)); } } @Override // gu3.a public boolean onDetach() { BizInfoHeaderPreference bizInfoHeaderPreference = (BizInfoHeaderPreference) this.f138225e.a("contact_info_header_bizinfo"); if (bizInfoHeaderPreference == null) { return true; } bizInfoHeaderPreference.S(); return true; } @Override // yf0.n public void onSceneEnd(int i15, int i16, String str, y yVar) { d94 d942; xv3.a aVar; xv3.a aVar2; d94 d943; d94 d944; hg hgVar; xv3.a aVar3; xv3.a aVar4; this.f138243z = false; i0 i0Var = this.G; if (i0Var != null && i0Var.isShowing()) { this.G.dismiss(); } if (yVar == null) { Log.e("MicroMsg.ContactWidgetBizInfo", "scene == null"); return; } p3.e().p(yVar.getType(), this); if (i15 == 0 && i16 == 0) { yVar.getType(); if (yVar.getType() == 536) { p3.e().p(536, this); l(); return; } z25 z25 = null; r2 = null; lq4 lq4 = null; z25 = null; if (yVar.getType() == 1363) { yf0.c cVar = ((ur2.c) yVar).f320130e; mq4 mq4 = (cVar == null || (aVar4 = cVar.f345549b.f345576a) == null) ? null : (mq4) aVar4; if (!(cVar == null || (aVar3 = cVar.f345548a.f345573a) == null)) { lq4 = (lq4) aVar3; } if (mq4 == null || (d944 = mq4.f30062d) == null || d944.f19097d != 0 || (hgVar = mq4.f30063e) == null || Util.isNullOrNil(hgVar.f23707d)) { if (mq4 == null || (d943 = mq4.f30062d) == null) { Log.w("MicroMsg.ContactWidgetBizInfo", "willen onSceneEnd err:resp == null"); } else { Log.w("MicroMsg.ContactWidgetBizInfo", "willen onSceneEnd err:code:%s", Integer.valueOf(d943.f19097d)); } } else if (mq4.f30063e == null) { Log.w("MicroMsg.ContactWidgetBizInfo", "willen onSceneEnd resp.user == null"); } else { cg0.j jVar = w0.cO0().get(mq4.f30063e.f23707d); if (jVar == null) { jVar = new cg0.j(); jVar.field_userId = mq4.f30063e.f23707d; } hg hgVar2 = mq4.f30063e; jVar.field_userName = hgVar2.f23708e; jVar.field_brandUserName = lq4.f28824d; jVar.field_UserVersion = hgVar2.f23709f; jVar.field_headImageUrl = hgVar2.f23710g; jVar.field_profileUrl = hgVar2.f23711h; jVar.field_bitFlag = hgVar2.f23712i; jVar.field_addMemberUrl = hgVar2.f23713j; jVar.field_needToUpdate = false; if (!w0.cO0().Sa(jVar)) { w0.cO0().insert(jVar); } } } else if (yVar.getType() == 1394) { yf0.c cVar2 = ((ur2.d) yVar).f320132e; y25 y25 = (cVar2 == null || (aVar2 = cVar2.f345548a.f345573a) == null) ? null : (y25) aVar2; if (!(cVar2 == null || (aVar = cVar2.f345549b.f345576a) == null)) { z25 = (z25) aVar; } if (z25 == null || (d942 = z25.f43980d) == null || d942.f19097d != 0) { if (z25 == null || z25.f43980d == null) { Log.w("MicroMsg.ContactWidgetBizInfo", "chuangchen onSceneEnd type:%s, err:resp == null", Integer.valueOf(yVar.getType())); } else { Log.w("MicroMsg.ContactWidgetBizInfo", "chuangchen onSceneEnd type:%s, err:code:%s", Integer.valueOf(yVar.getType()), Integer.valueOf(z25.f43980d.f19097d)); } } else if (!y25.f42898e) { ih.c cVar3 = this.f138227g; cVar3.field_brandFlag &= -2; b(cVar3, true); if (((i2) p3.b().w()).j(cVar3.field_username) == null) { h2 h2Var = new h2(cVar3.field_username); h2Var.i3(Util.nullAsNil(this.f138227g.u2())); f4 GY = ((g4) p3.b().z()).GY(cVar3.field_username); if (GY != null) { ((i2) p3.b().w()).W(h2Var); ((i2) p3.b().w()).p0(GY); } else { h2Var.s3(); ((i2) p3.b().w()).W(h2Var); } } if (((i2) p3.b().w()).j(cVar3.field_enterpriseFather) == null) { h2 h2Var2 = new h2(cVar3.field_enterpriseFather); h2Var2.s3(); ((i2) p3.b().w()).W(h2Var2); return; } p3.b().m().b(cVar3.field_enterpriseFather); } else { ih.c cVar4 = this.f138227g; cVar4.field_brandFlag |= 1; b(cVar4, true); ((i2) p3.b().w()).f(cVar4.field_username); if (((i2) p3.b().w()).K(cVar4.field_enterpriseFather) <= 0) { ((i2) p3.b().w()).f(cVar4.field_enterpriseFather); } else { p3.b().m().b(cVar4.field_enterpriseFather); } } } else if (yVar.getType() == 1343) { l(); } else if (yVar.getType() == 1228) { l(); } } else { Log.e("MicroMsg.ContactWidgetBizInfo", "scene.getType() = %s", Integer.valueOf(yVar.getType())); } } public final void p(boolean z15) { if (this.f138226f != null) { if (this.f138224d != null) { if (!z15 || ((w) yz3.j.c(w.class)).kL(this.f138226f.getUsername())) { this.f138224d.setTitleMuteIconVisibility(8); } else { this.f138224d.setTitleMuteIconVisibility(0); } } CheckBoxPreference checkBoxPreference = (CheckBoxPreference) this.f138225e.a("contact_is_mute"); if (checkBoxPreference != null) { checkBoxPreference.S(z15); } } } public final void q() { if (this.B == null) { MMActivity mMActivity = this.f138224d; this.B = mMActivity.getSharedPreferences(this.f138224d.getPackageName() + "_preferences", 0); } if (this.C != null) { if (this.f138226f != null) { this.B.edit().putBoolean("biz_placed_to_the_top", this.f138226f.E3()).commit(); } else { this.B.edit().putBoolean("biz_placed_to_the_top", false).commit(); } } this.f138225e.notifyDataSetChanged(); } }