package jp.naver.line.android.activity.chathistory; import a13.w; import a33.q1; import ae3.e; import ak3.o0; import android.app.Dialog; import android.app.KeyguardManager; import android.app.assist.AssistContent; import android.content.BroadcastReceiver; import android.content.ClipData; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.net.Uri; import android.os.BadParcelableException; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.text.SpannedString; import android.text.TextUtils; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.lifecycle.LiveData; import androidx.lifecycle.o0; import androidx.lifecycle.p0; import b80.v; import bn.a; import cm.a0; import cm.b0; import cm.c0; import cm.d0; import cm.p; import com.linecorp.chathistory.menu.ChatMenuActivity; import com.linecorp.chathistory.menu.ChatMenuData; import com.linecorp.chathistory.menu.MenuActionAvailabilityData; import com.linecorp.lich.lifecycle.AutoResetLifecycleScope; import com.linecorp.line.album.ui.viewmodel.n0; import com.linecorp.line.album.ui.viewmodel.z0; import com.linecorp.line.chatdata.model.friendtracking.FriendTrackingRoute; import com.linecorp.line.constants.BuildConfig; import com.linecorp.line.keep.model.KeepContentShareModel; import com.linecorp.line.media.picker.MediaPickerHelper; import com.linecorp.line.nelo.LineNelo; import com.linecorp.line.officialaccount.tracking.OaTalkRoomEventTracker; import com.linecorp.line.shopdata.sticker.model.StickerInfo; import com.linecorp.rxeventbus.Subscribe; import com.linecorp.rxeventbus.SubscriberType; import com.linecorp.square.chat.SquareChatUtils; import com.linecorp.square.modularization.domain.featureconfiguration.SquareFeatureConfigurationDomainInterface; import com.linecorp.square.modularization.domain.featureconfiguration.SquareFeatureConfigurationDomainInterfaceImpl; import com.linecorp.square.v2.bo.SquareBOsFactory; import com.linecorp.square.v2.db.model.chat.SquareChatClientType; import com.linecorp.square.v2.view.chathistory.SquareChatHistoryInitialScrollController; import com.linecorp.square.v2.view.chathistory.SquarePrefetchTrackingEventSender; import com.linecorp.square.v2.view.chathistory.SquareUnavailableChatRecoveryController; import com.linecorp.square.v2.view.memberpopup.SquareMemberPopupDialogFragment; import com.linecorp.square.v2.viewmodel.ad.SquareChatHistoryAdViewModel; import com.linecorp.yuki.sensetime.SenseTimeSlam; import dh3.x; import e23.i; import e23.t; import e53.o; import e72.x0; import fg3.a; import fx.m; import ha3.j0; import hg3.k; import ij3.r; import ij3.v; import java.io.Serializable; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Queue; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import jj3.z; import jp.naver.gallery.android.media.MediaItem; import jp.naver.gallery.list.ChatMediaContentActivity; import jp.naver.gallery.model.MediaListChatData; import jp.naver.gallery.viewer.ChatVisualEndPageActivity; import jp.naver.gallery.viewer.VideoPlaybackSyncEvent; import jp.naver.line.android.LineApplication; import jp.naver.line.android.R; import jp.naver.line.android.activity.SplashActivity; import jp.naver.line.android.activity.chathistory.ChatMemberListActivity; import jp.naver.line.android.activity.chathistory.OtherActivityConnector; import jp.naver.line.android.activity.chathistory.autosuggestion.AutoSuggestionHelper; import jp.naver.line.android.activity.chathistory.call.groupcall.GroupCallThumbnailContainer; import jp.naver.line.android.activity.chathistory.dialog.p; import jp.naver.line.android.activity.chathistory.dialog.x; import jp.naver.line.android.activity.chathistory.l3; import jp.naver.line.android.activity.chathistory.m1; import jp.naver.line.android.activity.chathistory.tfile.TransferredFileEventHelper; import jp.naver.line.android.activity.choosemember.ChooseMemberActivity; import jp.naver.line.android.activity.choosemember.b; import jp.naver.line.android.activity.group.GroupMembersActivity; import jp.naver.line.android.activity.main.MainActivity; import jp.naver.line.android.activity.sharecontact.list.ChooseDeviceContactActivity; import jp.naver.line.android.analytics.ga.GACustomDimensions; import jp.naver.line.android.analytics.ga.annotation.GAScreenTracking; import jp.naver.line.android.chathistory.officialaccount.OaMessageEventTracker; import jp.naver.line.android.model.ChatData; import jp.naver.line.android.model.Location; import jp.naver.line.android.urlscheme.SchemeServiceReferrer; import jp.naver.line.android.util.MultiWindowCallbackLifecycleDelegate; import jp.naver.line.android.util.i0; import jp.naver.line.android.util.m0; import jp.naver.line.android.util.u; import k11.f0; import k11.k0; import k81.s; import kk0.c; import kotlin.NoWhenBranchMatchedException; import kotlin.Pair; import kotlin.TuplesKt; import kotlin.Unit; import l23.k; import lk.e; import lk3.d; import m53.a; import ma3.a; import mb0.i; import mk0.i; import mx2.v0; import ng2.l; import o42.b; import o70.e0; import o70.q; import oa3.g; import org.apache.cordova.networkinformation.NetworkManager; import org.json.JSONObject; import p23.k; import pk3.a; import ql3.g0; import r43.a; import sm.b; import t60.c; import th3.h; import tm.d1; import tm.s1; import tm.w2; import tm.x2; import u3.y; import u40.b; import um3.w0; import yd2.n; import yk3.cf; import z51.j; @GAScreenTracking(autoTracking = false) public class ChatHistoryActivity extends r13.c { /* renamed from: i4 reason: collision with root package name */ public static final /* synthetic */ int f93744i4 = 0; public f43.f A; public u43.a B; public k C; public z.e D; public final a1 E = new a1(); public OaMessageEventTracker.SessionId F; public md2.d G; public final AtomicBoolean G3 = new AtomicBoolean(); public d81.d H; public long H3; public n I; public final Queue<Runnable> I3 = new LinkedList(); public bo.c J; public h70.a J3; public ye2.c K; public SquareChatHistoryAdViewModel K3; public j L; public final BroadcastReceiver L3 = new a(); public fa2.c M; public final BroadcastReceiver M3 = new b(); public q N; public e N3 = new e(this); public eb.g O; public final p0<b.C2933b> O3 = new m(this, 26); public final a3 P = new a3(j0.l()); public u4 P3; public q1 Q; public bm0.m Q3; public final y92.a R = new y92.a(); public zi1.n R3; public boolean S; public fd3.e S3; public volatile boolean T; public ld3.a T3; public AutoSuggestionHelper U; public z1 U3; public boolean V; public volatile boolean V1; public boolean V2; public o V3; public long W = -1; public lk3.d W3; public h43.q X; public long X3 = -1; public y43.d Y; public final MultiWindowCallbackLifecycleDelegate Y3 = new MultiWindowCallbackLifecycleDelegate(this, new h(this, 0), new i(this, 0)); public y1 Z; public final MultiWindowCallbackLifecycleDelegate Z3 = new MultiWindowCallbackLifecycleDelegate(this, k.f94366c, new kr0.d(this, 1), false); /* renamed from: a4 reason: collision with root package name */ public k70.a f93745a4; /* renamed from: b4 reason: collision with root package name */ public final o0<Boolean> f93746b4 = new o0<>(Boolean.FALSE); /* renamed from: c4 reason: collision with root package name */ public boolean f93747c4 = false; /* renamed from: d4 reason: collision with root package name */ public final AutoResetLifecycleScope f93748d4; /* renamed from: e4 reason: collision with root package name */ public final o53.f f93749e4; /* renamed from: f4 reason: collision with root package name */ public final r60.a f93750f4; /* renamed from: g4 reason: collision with root package name */ public r43.a f93751g4; /* renamed from: h4 reason: collision with root package name */ public boolean f93752h4; /* renamed from: j reason: collision with root package name */ public final Handler f93753j = new Handler(); /* renamed from: k reason: collision with root package name */ public final m1 f93754k = new m1(); /* renamed from: l reason: collision with root package name */ public final w92.c f93755l = new w92.b(u.f98488a); /* renamed from: m reason: collision with root package name */ public OtherActivityConnector f93756m; /* renamed from: n reason: collision with root package name */ public final u f93757n; /* renamed from: o reason: collision with root package name */ public final og3.b f93758o; /* renamed from: p reason: collision with root package name */ public wd2.a f93759p; /* renamed from: q reason: collision with root package name */ public y f93760q; /* renamed from: r reason: collision with root package name */ public bn.a f93761r; /* renamed from: s reason: collision with root package name */ public d72.a f93762s; /* renamed from: t reason: collision with root package name */ public i f93763t; /* renamed from: u reason: collision with root package name */ public v2 f93764u; /* renamed from: v reason: collision with root package name */ public ChatHistoryRequest f93765v; /* renamed from: w reason: collision with root package name */ public boolean f93766w; /* renamed from: x reason: collision with root package name */ public boolean f93767x; /* renamed from: y reason: collision with root package name */ public boolean f93768y; /* renamed from: z reason: collision with root package name */ public j0 f93769z; public class a extends BroadcastReceiver { public a() { } public void onReceive(Context context, Intent intent) { o23.n nVar; if (ChatHistoryActivity.this.T) { ChatHistoryActivity chatHistoryActivity = ChatHistoryActivity.this; w92.c cVar = chatHistoryActivity.f93755l; if (chatHistoryActivity.Q3.a() || ChatHistoryActivity.this.J8()) { nVar = o23.n.SHOWN; } else { nVar = o23.n.HIDDEN; } cVar.b(nVar); ChatHistoryActivity.this.T = false; } } } public class b extends BroadcastReceiver { public b() { } public void onReceive(Context context, Intent intent) { x0 x0Var; if (intent != null && !TextUtils.isEmpty(intent.getAction()) && (x0Var = ChatHistoryActivity.this.E.f93887a) != null) { x0Var.b(); ChatHistoryActivity.this.f93755l.b(new o23.j(x0Var)); String action = intent.getAction(); if (x0Var.d().equals(intent.getStringExtra("chatId")) && action.equals("jp.naver.line.android.common.NOTIFIED_UPDATE_CONTENT_PREVIEW")) { ChatHistoryActivity.this.f93769z.l(); if (ChatHistoryActivity.this.f93769z.i()) { ChatHistoryActivity.this.f93753j.post(new ta.j(this, 13)); } } } } } public class c implements d.AbstractC1740d { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ e60.b f93772a; public c(ChatHistoryActivity chatHistoryActivity, e60.b bVar) { this.f93772a = bVar; } @Override // lk3.d.AbstractC1740d public void d(boolean z14) { this.f93772a.d(z14); } } public static /* synthetic */ class d { /* renamed from: a reason: collision with root package name */ public static final /* synthetic */ int[] f93773a; /* renamed from: b reason: collision with root package name */ public static final /* synthetic */ int[] f93774b; /* renamed from: c reason: collision with root package name */ public static final /* synthetic */ int[] f93775c; /* JADX WARNING: Can't wrap try/catch for region: R(23:0|(2:1|2)|3|(2:5|6)|7|9|10|11|12|13|(2:15|16)|17|(2:19|20)|21|23|24|25|26|27|28|29|30|32) */ /* JADX WARNING: Can't wrap try/catch for region: R(25:0|1|2|3|(2:5|6)|7|9|10|11|12|13|(2:15|16)|17|19|20|21|23|24|25|26|27|28|29|30|32) */ /* JADX WARNING: Code restructure failed: missing block: B:33:?, code lost: return; */ /* JADX WARNING: Failed to process nested try/catch */ /* JADX WARNING: Missing exception handler attribute for start block: B:11:0x0028 */ /* JADX WARNING: Missing exception handler attribute for start block: B:25:0x0053 */ /* JADX WARNING: Missing exception handler attribute for start block: B:27:0x005d */ /* JADX WARNING: Missing exception handler attribute for start block: B:29:0x0067 */ static { int[] iArr = new int[k72.a.a().length]; f93775c = iArr; try { iArr[j.q.e(1)] = 1; } catch (NoSuchFieldError unused) { } try { f93775c[j.q.e(2)] = 2; } catch (NoSuchFieldError unused2) { } int[] iArr2 = new int[e3.a().length]; f93774b = iArr2; iArr2[j.q.e(1)] = 1; f93774b[j.q.e(2)] = 2; try { f93774b[j.q.e(3)] = 3; } catch (NoSuchFieldError unused3) { } try { f93774b[j.q.e(4)] = 4; } catch (NoSuchFieldError unused4) { } int[] iArr3 = new int[yf3.g.values().length]; f93773a = iArr3; iArr3[yf3.g.AUDIO.ordinal()] = 1; f93773a[yf3.g.VIDEO.ordinal()] = 2; f93773a[yf3.g.NONE.ordinal()] = 3; f93773a[yf3.g.UNKNOWN.ordinal()] = 4; } } public final class e implements r.b { /* renamed from: a reason: collision with root package name */ public final Context f93776a; public e(Context context) { this.f93776a = context; } @Override // ij3.r.b public void a(dh3.m mVar) { z23.d e14; ChatHistoryActivity chatHistoryActivity = ChatHistoryActivity.this; chatHistoryActivity.f93753j.post(new b30.c(chatHistoryActivity, 6)); yf3.b bVar = mVar.f63872o; s G = bVar != null ? bVar.G() : s.STATIC; if (G.f() && !G.e()) { Objects.requireNonNull(ChatHistoryActivity.this.f93758o); qd2.m.a().f132320f = String.valueOf(mVar.f63858a); } if (mVar.f63866i != null) { ChatHistoryActivity.this.f93753j.post(new js0.j(this, mVar, 2)); } j0 j0Var = ChatHistoryActivity.this.f93769z; if (j0Var != null && (e14 = j0Var.e()) != null) { StringBuilder a14 = b.d.a(""); a14.append(mVar.f63858a); String sb4 = a14.toString(); em3.q.f(sb4, "popupStickerMessageId"); e14.f197328n = sb4; } } @Override // ij3.r.b public void b(Exception exc) { ChatHistoryActivity.this.f93753j.post(new rg0.b(this, exc, 2)); } @Override // ij3.n public void c(ij3.a aVar) { ChatHistoryActivity chatHistoryActivity = ChatHistoryActivity.this; chatHistoryActivity.f93753j.post(new oa.e(chatHistoryActivity, 11)); } @Override // ij3.r.b public void d() { ChatHistoryActivity chatHistoryActivity = ChatHistoryActivity.this; chatHistoryActivity.f93753j.post(new b30.e(chatHistoryActivity, 13)); } @Override // ij3.n public void e(ij3.a aVar, Throwable th4) { ChatHistoryActivity chatHistoryActivity = ChatHistoryActivity.this; chatHistoryActivity.f93753j.post(new y(chatHistoryActivity, 13)); kk3.a.b(this.f93776a, th4, ChatHistoryActivity.this.f93753j, false); } } public static class f { /* renamed from: a reason: collision with root package name */ public final String f93778a; /* renamed from: b reason: collision with root package name */ public final GACustomDimensions f93779b; public f(String str, GACustomDimensions gACustomDimensions, a aVar) { this.f93778a = str; this.f93779b = gACustomDimensions; } } public enum g { CHAT_LIST, OA_PROFILE, UNKNOWN } public ChatHistoryActivity() { AutoResetLifecycleScope autoResetLifecycleScope = new AutoResetLifecycleScope(this); this.f93748d4 = autoResetLifecycleScope; this.f93749e4 = new o53.f(this, autoResetLifecycleScope); this.f93750f4 = new r60.b(this); this.f93752h4 = false; this.f93757n = new u(this); this.f93758o = new og3.b(); } public static Intent C8(Context context, ChatHistoryRequest chatHistoryRequest) { if (context == null) { return null; } return D8(context, chatHistoryRequest, g.UNKNOWN); } public static Intent D8(Context context, ChatHistoryRequest chatHistoryRequest, g gVar) { Intent intent = new Intent(context, ChatHistoryActivityLaunchActivity.class); intent.putExtra("chatHistoryRequest.extra", chatHistoryRequest); intent.putExtra("chatHistoryReferrer.extra", gVar); return intent; } public static boolean i9(Context context, String str) { if (!(context instanceof ChatHistoryActivity)) { return false; } ((ChatHistoryActivity) context).h9(str); return true; } public static void z8(ChatHistoryActivity chatHistoryActivity) { if (!chatHistoryActivity.isFinishing()) { chatHistoryActivity.f93769z.n(); chatHistoryActivity.f93769z.s(); } } public final String A8() { x0 x0Var = this.E.f93887a; if (x0Var != null) { return x0Var.a(); } return null; } public void B8(z1 z1Var) { this.U3 = z1Var; if (jp.naver.line.android.util.p0.c(this, z1Var.d(), 1)) { this.U3 = null; this.X.o(z1Var); } } public final SchemeServiceReferrer E8() { ChatData H8 = H8(); if (H8 == null) { return SchemeServiceReferrer.Unknown.f98264c; } return new SchemeServiceReferrer.Chat(H8.d(), H8 instanceof ChatData.Square ? ((ChatData.Square) H8).f97529d : null, my.a.a(H8)); } public void F8() { super.onBackPressed(); } /* JADX WARNING: Code restructure failed: missing block: B:57:0x00d5, code lost: if (r0 != false) goto L_0x001f; */ /* JADX WARNING: Code restructure failed: missing block: B:76:0x011a, code lost: if (r0 != false) goto L_0x001f; */ public final boolean G8() { boolean z14; boolean z15; boolean z16; boolean z17; boolean z18; boolean z19; boolean z24; i43.c cVar; boolean z25; T t14; p2.a<T> aVar; m1.b<? extends DialogInterface> bVar = this.f93754k.f94457b; if (bVar == null || (t14 = bVar.f94459a.get()) == null || (aVar = bVar.f94461c) == null) { z14 = false; } else { aVar.accept(t14); z14 = true; } if (!z14) { FragmentManager supportFragmentManager = getSupportFragmentManager(); if (supportFragmentManager.J("fragment_tag_edit_message_sticker") == null) { z16 = false; } else { supportFragmentManager.d0("fragment_tag_edit_message_sticker", 1); this.X.V(true); this.X.A(); z16 = true; } if (!z16) { o oVar = this.V3; if (!oVar.f66858c.d().f()) { z17 = false; } else { oVar.f66858c.g(g53.o.NAVIGATION_VIEW_ONLY); oVar.b(); oVar.f66860e.f125980j.c(); z17 = true; } if (!z17) { if (M8()) { k9(false); } else { h43.q qVar = this.X; if (qVar != null) { if (!qVar.f79179e.o() && !qVar.f79179e.q() && !qVar.f79179e.p() && !qVar.n() && ((cVar = qVar.C) == null || !cVar.b())) { k43.k kVar = qVar.f79192r; if (kVar.f100591w.l() > 0) { kVar.b(); } else if (kVar.h()) { kVar.f(); } else { z25 = false; if (!z25 && !qVar.f79177c.b() && (!qVar.f79178d.f79258q || !qVar.l())) { z24 = false; } } z25 = true; z24 = false; } z24 = true; } u uVar = this.f93757n; if (!uVar.f94652e) { z18 = false; } else if (uVar.f94653f.b()) { z18 = true; } else { z18 = uVar.f94654g.b(); } if (!z18) { y yVar = this.f93760q; if (yVar != null) { if (!rb.a.i(yVar.a()) || yVar.f94821i != t.UNFOLD || yVar.f94820h.isEmpty()) { z19 = false; } else { yVar.d(t.FOLD); z19 = true; } } if (L8()) { b9(jp.naver.line.android.activity.chathistory.dialog.e.INVALID); } else { z15 = false; return z15 || P8(); } } } } } } z15 = true; if (z15) { return true; } } public final ChatData H8() { x0 x0Var = this.E.f93887a; if (x0Var == null) { return null; } x0Var.b(); return x0Var.f94790d; } public final x I8() { x0 x0Var = this.E.f93887a; if (x0Var == null) { return null; } x0Var.b(); return x0Var.f94792f; } public final boolean J8() { KeyguardManager keyguardManager = (KeyguardManager) getSystemService("keyguard"); return keyguardManager != null && keyguardManager.inKeyguardRestrictedInputMode(); } public boolean K8() { x xVar; x0 x0Var = this.E.f93887a; if (x0Var != null) { x0Var.b(); xVar = x0Var.f94792f; } else { xVar = null; } return xVar != null && xVar.a(); } public boolean L8() { j0 j0Var = this.f93769z; z23.d e14 = j0Var != null ? j0Var.e() : null; return e14 != null && e14.f197325k.d(); } public boolean M8() { j2.e.j(); return this.V3.f66858c.d() != g53.o.INVISIBLE; } public boolean N8() { return getResources().getConfiguration().orientation == 2; } public void O8() { y yVar = this.f93760q; if (yVar != null) { yVar.b(); } } public boolean P8() { if (!isFinishing()) { u.f98488a.execute(d.f94015b); x0 x0Var = this.E.f93887a; x xVar = x0Var != null ? x0Var.f94794h : null; if (xVar != null && xVar.z()) { m1 m1Var = this.f93754k; String A8 = A8(); Objects.requireNonNull(m1Var); p pVar = new p(this, A8); pVar.f94167b.show(); m1.b<? extends DialogInterface> bVar = new m1.b<>(pVar); m1Var.b(); m1Var.f94457b = bVar; return true; } this.G3.set(true); ChatHistoryRequest chatHistoryRequest = this.f93765v; if (chatHistoryRequest != null) { int i14 = chatHistoryRequest.f93798r; if (i14 != 0) { switch (i14) { case 10: new s1(this, this.F).g(A8(), K8(), ChatMediaContentActivity.d.ALBUMS, yo1.p.TALKROOM); break; case 11: new s1(this, null).g(A8(), K8(), ChatMediaContentActivity.d.ALBUMS, yo1.p.TALKROOM); break; case 12: String A82 = A8(); if (A82 != null) { startActivity(GroupMembersActivity.z8(this, A82)); break; } break; case 13: String A83 = A8(); if (A83 != null) { dx0.s.f65548j.c(this, A83, yo1.p.TALKROOM, true); break; } break; } } else { Intent C8 = MainActivity.C8(this); ChatHistoryRequest chatHistoryRequest2 = this.f93765v; if (chatHistoryRequest2 != null && chatHistoryRequest2.f93790j) { C8.putExtra("CHAT_LIST_MOVE_ALL_TAB", true); } C8.addFlags(268435456); startActivity(C8); } } } return false; } public final void Q8(g gVar) { Map map; b0 b0Var; ChatData H8 = H8(); if (H8 == null) { this.I3.offer(new g3.c(this, gVar, 5)); } else if (H8.F()) { ChatHistoryRequest chatHistoryRequest = this.f93765v; if (chatHistoryRequest == null) { map = new HashMap(); } else { map = chatHistoryRequest.J; } OaTalkRoomEventTracker oaTalkRoomEventTracker = (OaTalkRoomEventTracker) rb.a.d(this, OaTalkRoomEventTracker.f38170h); String d14 = H8.d(); Objects.requireNonNull(oaTalkRoomEventTracker); em3.q.f(d14, "botMid"); em3.q.f(map, "enterParameters"); em3.q.f(gVar, "referrer"); if (oaTalkRoomEventTracker.b()) { int i14 = OaTalkRoomEventTracker.c.$EnumSwitchMapping$0[gVar.ordinal()]; if (i14 == 1) { b0Var = b0.TALK_LIST; } else if (i14 == 2) { b0Var = b0.PROFILE; } else if (i14 == 3) { b0Var = b0.UNKNOWN; } else { throw new NoWhenBranchMatchedException(); } cm.z zVar = new cm.z(); zVar.f21096c = b0Var; LinkedHashMap linkedHashMap = new LinkedHashMap(); Iterator it3 = map.entrySet().iterator(); while (true) { boolean z14 = false; if (!it3.hasNext()) { break; } Map.Entry entry = (Map.Entry) it3.next(); String str = (String) entry.getKey(); if (sm3.r.G(str, "oat_", false, 2) && !em3.q.b(str, "oat_referrer")) { z14 = true; } if (z14) { linkedHashMap.put(entry.getKey(), entry.getValue()); } } if (!linkedHashMap.isEmpty()) { cm.t tVar = new cm.t(linkedHashMap); a0 a0Var = new a0(); a0Var.setField_ = a0.b.PROFILE_REFERER_CONTENT; a0Var.value_ = tVar; zVar.f21097d = a0Var; } c0 c0Var = new c0(d0.ENTER); c0Var.f20981c = zVar; cm.s sVar = cm.s.TALK_ROOM; cm.p pVar = new cm.p(); pVar.setField_ = p.b.TALKROOM; pVar.value_ = c0Var; Pair[] pairArr = new Pair[3]; pairArr[0] = TuplesKt.to("botMid", d14); pairArr[1] = TuplesKt.to(zq0.c.QUERY_KEY_MYCODE_TYPE, c0Var.f20980b); cm.z zVar2 = c0Var.f20981c; pairArr[2] = TuplesKt.to("referrer", zVar2 != null ? zVar2.f21096c : null); g0.j(pairArr); oaTalkRoomEventTracker.a(sVar, d14, pVar); } } } public boolean R8(int i14, boolean z14) { ChatData H8 = H8(); if (z14 && H8 != null) { m53.a e14 = m53.a.e(); String d14 = H8.d(); Objects.requireNonNull(e14); String.format("TypingStatusManager.notifyMessageReceivedEvent(%s)", d14); a.c g14 = e14.g(); g14.f110193a = d14; g14.f110194b = 3; Message obtainMessage = e14.f110189d.obtainMessage(3, g14); if (Looper.getMainLooper() == Looper.myLooper()) { e14.f110189d.dispatchMessage(obtainMessage); obtainMessage.recycle(); } else { e14.f110189d.sendMessage(obtainMessage); } if (uf3.c.d(uf3.a.NOTI_SOUND_ENABLE, Boolean.TRUE).booleanValue() && H8.E()) { pk3.a.a(this, a.c.SEND_MESSAGE); } } int[] iArr = d.f93774b; if (i14 != 0) { int i15 = iArr[i14 - 1]; if (i15 == 1) { V8(); return true; } else if (i15 == 2) { return this.f93769z.q(false); } else { if (i15 != 3) { return false; } return this.f93769z.q(true); } } else { throw null; } } /* JADX WARNING: Code restructure failed: missing block: B:102:0x0172, code lost: if (((jp.naver.line.android.model.ChatData.Single) r5).A == false) goto L_0x0179; */ /* JADX WARNING: Code restructure failed: missing block: B:184:0x0233, code lost: if (((jp.naver.line.android.model.ChatData.Square) r5).N() == false) goto L_0x023e; */ /* JADX WARNING: Code restructure failed: missing block: B:240:0x02c0, code lost: if (r7.J.f100011a != false) goto L_0x02d4; */ /* JADX WARNING: Code restructure failed: missing block: B:265:0x030b, code lost: if (r7.f99977j.f100004f != false) goto L_0x030d; */ /* JADX WARNING: Code restructure failed: missing block: B:87:0x0151, code lost: if (((jp.naver.line.android.model.ChatData.Single) r5).A == false) goto L_0x015e; */ /* JADX WARNING: Removed duplicated region for block: B:101:0x016d */ /* JADX WARNING: Removed duplicated region for block: B:103:0x0175 */ /* JADX WARNING: Removed duplicated region for block: B:116:0x0190 */ /* JADX WARNING: Removed duplicated region for block: B:117:0x0194 */ /* JADX WARNING: Removed duplicated region for block: B:119:0x019a */ /* JADX WARNING: Removed duplicated region for block: B:120:0x019d */ /* JADX WARNING: Removed duplicated region for block: B:130:0x01af */ /* JADX WARNING: Removed duplicated region for block: B:131:0x01b7 */ /* JADX WARNING: Removed duplicated region for block: B:143:0x01ce */ /* JADX WARNING: Removed duplicated region for block: B:144:0x01d1 */ /* JADX WARNING: Removed duplicated region for block: B:156:0x01e8 */ /* JADX WARNING: Removed duplicated region for block: B:159:0x01f4 */ /* JADX WARNING: Removed duplicated region for block: B:171:0x020b */ /* JADX WARNING: Removed duplicated region for block: B:172:0x0215 */ /* JADX WARNING: Removed duplicated region for block: B:183:0x022c */ /* JADX WARNING: Removed duplicated region for block: B:185:0x0236 */ /* JADX WARNING: Removed duplicated region for block: B:196:0x024d */ /* JADX WARNING: Removed duplicated region for block: B:197:0x0255 */ /* JADX WARNING: Removed duplicated region for block: B:209:0x0273 */ /* JADX WARNING: Removed duplicated region for block: B:210:0x027d */ /* JADX WARNING: Removed duplicated region for block: B:222:0x0295 */ /* JADX WARNING: Removed duplicated region for block: B:223:0x0298 */ /* JADX WARNING: Removed duplicated region for block: B:235:0x02af */ /* JADX WARNING: Removed duplicated region for block: B:241:0x02c3 */ /* JADX WARNING: Removed duplicated region for block: B:252:0x02df */ /* JADX WARNING: Removed duplicated region for block: B:260:0x02f8 */ /* JADX WARNING: Removed duplicated region for block: B:276:0x0327 */ /* JADX WARNING: Removed duplicated region for block: B:277:0x032a */ /* JADX WARNING: Removed duplicated region for block: B:290:0x0355 */ /* JADX WARNING: Removed duplicated region for block: B:291:0x035c */ /* JADX WARNING: Removed duplicated region for block: B:294:0x0361 */ /* JADX WARNING: Removed duplicated region for block: B:295:0x0364 */ public void S8() { String str; ChatMenuData chatMenuData; w2 w2Var; boolean z14; String str2; boolean z15; boolean z16; boolean z17; boolean z18; String str3; boolean z19; boolean z24; boolean z25; boolean z26; boolean z27; boolean z28; boolean z29; boolean z34; boolean z35; boolean z36; boolean z37; boolean z38; boolean z39; boolean z44; boolean z45; boolean z46; boolean z47; boolean z48; boolean z49; boolean z54; boolean z55; boolean z56; boolean z57; boolean z58; boolean z59; boolean z64; boolean z65; boolean z66; boolean z67; boolean z68; boolean z69; boolean z74; boolean z75; boolean z76; boolean z77; boolean z78; boolean z79; boolean z84; boolean z85; x xVar; x0 x0Var = this.E.f93887a; if (x0Var != null) { y1 y1Var = this.Z; if (y1Var == null) { str = ""; } else { str = z1.d.o(y1Var.f94841a) ? y1Var.f94842b : null; } int i14 = SquareFeatureConfigurationDomainInterface.f51100a; SquareFeatureConfigurationDomainInterface a14 = SquareFeatureConfigurationDomainInterface.Companion.f51101a.a((je1.a) rb.a.d(this, je1.a.f91433a)); boolean x14 = this.R3.x(); SquareFeatureConfigurationDomainInterfaceImpl squareFeatureConfigurationDomainInterfaceImpl = (SquareFeatureConfigurationDomainInterfaceImpl) a14; boolean e14 = squareFeatureConfigurationDomainInterfaceImpl.e(); boolean s14 = squareFeatureConfigurationDomainInterfaceImpl.f51102b.s(); String a15 = this.f93757n.a(); ChatData chatData = x0Var.f94790d; if (chatData == null) { chatMenuData = null; } else { List<x> e15 = x0Var.e(); String mid = (e15 == null || (xVar = (x) ql3.u.R(e15)) == null) ? null : xVar.getMid(); boolean F2 = chatData.F(); boolean z86 = chatData instanceof ChatData.Square; ChatData.Square square = z86 ? (ChatData.Square) chatData : null; boolean z87 = (square != null ? square.f97530e : null) == SquareChatClientType.ONE_ON_ONE; ChatData chatData2 = x0Var.f94790d; if (chatData2 instanceof ChatData.Single) { em3.q.e(chatData2, "chatData"); ChatData.Single single = (ChatData.Single) chatData2; if (!single.J()) { w2Var = w2.INVALID; } else { switch (x2.a.$EnumSwitchMapping$0[single.f97519s.ordinal()]) { case 1: case 2: case 3: w2Var = w2.BLOCKED; break; case 4: w2Var = w2.INVALID; break; case 5: case 6: case 7: w2Var = w2.NORMAL; break; default: throw new NoWhenBranchMatchedException(); } } } else if (chatData2 instanceof ChatData.Group) { em3.q.e(chatData2, "chatData"); if (((ChatData.Group) chatData2).J()) { w2Var = w2.NORMAL; } else { w2Var = w2.INVALID; } } else if (chatData2 instanceof ChatData.Square) { em3.q.e(chatData2, "chatData"); ChatData.Square square2 = (ChatData.Square) chatData2; if (!square2.J()) { w2Var = w2.INVALID; } else if (square2.N()) { x xVar2 = x0Var.f94792f; if (xVar2 != null && xVar2.z()) { w2Var = w2.BLOCKED; } else { w2Var = w2.NORMAL; } } else { w2Var = w2.NORMAL; } } else { if (chatData2 instanceof ChatData.Room) { z85 = true; } else { z85 = chatData2 instanceof ChatData.Memo; } if (z85) { w2Var = w2.NORMAL; } else { throw new NoWhenBranchMatchedException(); } } f0 e16 = ti3.f.INSTANCE.e(); em3.q.e(e16, "getInstance().serviceConfiguration"); boolean z88 = hg3.c.b() && k.a.f81514a.m(chatData.d()); ChatData.a g14 = chatData.g(); String d14 = chatData.d(); ChatData.Square square3 = z86 ? (ChatData.Square) chatData : null; if (square3 != null) { str2 = square3.f97529d; z14 = s14; } else { z14 = s14; str2 = null; } boolean z89 = x0Var.f94801o; boolean z94 = chatData instanceof ChatData.Single; if (z94) { z15 = e14; } else { z15 = e14; if (z86) { z79 = true; } else { z79 = chatData instanceof ChatData.Group; } if (!z79) { if (chatData instanceof ChatData.Memo) { z84 = true; } else { z84 = chatData instanceof ChatData.Room; } if (!z84) { throw new NoWhenBranchMatchedException(); } z16 = false; if (z94) { if (!(chatData instanceof ChatData.Group)) { if (z86) { z77 = true; } else { z77 = chatData instanceof ChatData.Memo; } if (z77) { z78 = true; } else { z78 = chatData instanceof ChatData.Room; } if (!z78) { throw new NoWhenBranchMatchedException(); } z17 = false; z18 = chatData instanceof ChatData.Room; if (z18) { str3 = a15; z19 = true; } else { str3 = a15; z19 = chatData instanceof ChatData.Group; } if (z19) { z24 = true; } else { if (chatData instanceof ChatData.Memo ? true : z94 ? true : z86) { z24 = false; } else { throw new NoWhenBranchMatchedException(); } } if (z94) { z25 = ((ChatData.Single) chatData).A; } else { if (z18) { z75 = true; } else { z75 = chatData instanceof ChatData.Group; } if (z75) { z76 = true; } else { z76 = chatData instanceof ChatData.Memo; } if (z76 ? true : z86) { z25 = false; } else { throw new NoWhenBranchMatchedException(); } } if (z86) { z26 = z89; } else { if (z18) { z69 = true; } else { z69 = chatData instanceof ChatData.Group; } if (z69 ? true : z94) { z74 = true; } else { z74 = chatData instanceof ChatData.Memo; } if (z74) { z26 = false; } else { throw new NoWhenBranchMatchedException(); } } if (!z86) { if (z18) { z67 = true; } else { z67 = chatData instanceof ChatData.Group; } if (z67 ? true : z94) { z68 = true; } else { z68 = chatData instanceof ChatData.Memo; } if (!z68) { throw new NoWhenBranchMatchedException(); } } else if (!((ChatData.Square) chatData).N()) { z27 = true; if (!z94) { z28 = ((ChatData.Single) chatData).J(); } else if (z86) { z28 = true; } else { if (z18) { z65 = true; } else { z65 = chatData instanceof ChatData.Group; } if (z65) { z66 = true; } else { z66 = chatData instanceof ChatData.Memo; } if (z66) { z28 = false; } else { throw new NoWhenBranchMatchedException(); } } if (z86) { if (z18) { z59 = true; } else { z59 = chatData instanceof ChatData.Group; } if (!z59) { if (z94) { z64 = true; } else { z64 = chatData instanceof ChatData.Memo; } if (!z64) { throw new NoWhenBranchMatchedException(); } z29 = false; if (z94) { z56 = ((ChatData.Single) chatData).J(); } else if (z86) { z56 = ((ChatData.Square) chatData).N(); } else { if (z18) { z57 = true; } else { z57 = chatData instanceof ChatData.Group; } if (z57) { z58 = true; } else { z58 = chatData instanceof ChatData.Memo; } if (z58) { z34 = false; if (!z94) { z35 = ((ChatData.Single) chatData).J(); } else { if (z18) { z55 = true; } else { z55 = chatData instanceof ChatData.Group; } if (z55 ? true : z86) { z35 = true; } else if (chatData instanceof ChatData.Memo) { z35 = false; } else { throw new NoWhenBranchMatchedException(); } } if (!z86) { z36 = z14; } else { if (z18) { z49 = true; } else { z49 = chatData instanceof ChatData.Group; } if (z49 ? true : z94) { z54 = true; } else { z54 = chatData instanceof ChatData.Memo; } if (z54) { z36 = false; } else { throw new NoWhenBranchMatchedException(); } } if (!z94) { ChatData.Single single2 = (ChatData.Single) chatData; if (single2.J()) { if (!single2.A) { } } z37 = false; if (z94) { ChatData.Single single3 = (ChatData.Single) chatData; if (!single3.J() || single3.A || !e16.f99977j.f100004f) { z39 = z94; z38 = false; if (!z86) { z44 = z15; } else { if (z18) { z45 = true; } else { z45 = chatData instanceof ChatData.Group; } if (z45 ? true : z39) { z46 = true; } else { z46 = chatData instanceof ChatData.Memo; } if (z46) { z44 = false; } else { throw new NoWhenBranchMatchedException(); } } MenuActionAvailabilityData menuActionAvailabilityData = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t14 = chatData.t(); boolean z95 = !x0Var.f94791e; b80.u uVar = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData, F2, w2Var, t14, mid, z87, x14, str3, z95, !(chatData instanceof ChatData.Group) ? uVar == null ? Boolean.valueOf(uVar.f11518f) : null : null, str); } else { z39 = z94; } } else { if (chatData instanceof ChatData.Group) { z39 = z94; if (((ChatData.Group) chatData).f97448u != b80.y.ON_INVITATION) { } } else { z39 = z94; if (z18) { z38 = e16.f99977j.f100004f; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData2 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t142 = chatData.t(); boolean z952 = !x0Var.f94791e; b80.u uVar2 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData2, F2, w2Var, t142, mid, z87, x14, str3, z952, !(chatData instanceof ChatData.Group) ? uVar2 == null ? Boolean.valueOf(uVar2.f11518f) : null : null, str); } else { if (z86) { z47 = true; } else { z47 = chatData instanceof ChatData.Memo; } if (!z47) { throw new NoWhenBranchMatchedException(); } } } z38 = false; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData22 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t1422 = chatData.t(); boolean z9522 = !x0Var.f94791e; b80.u uVar22 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData22, F2, w2Var, t1422, mid, z87, x14, str3, z9522, !(chatData instanceof ChatData.Group) ? uVar22 == null ? Boolean.valueOf(uVar22.f11518f) : null : null, str); } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t14222 = chatData.t(); boolean z95222 = !x0Var.f94791e; b80.u uVar222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData222, F2, w2Var, t14222, mid, z87, x14, str3, z95222, !(chatData instanceof ChatData.Group) ? uVar222 == null ? Boolean.valueOf(uVar222.f11518f) : null : null, str); } else { if (z18) { z48 = true; } else { z48 = chatData instanceof ChatData.Group; } if (z48) { z37 = e16.J.f100011a; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData2222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t142222 = chatData.t(); boolean z952222 = !x0Var.f94791e; b80.u uVar2222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData2222, F2, w2Var, t142222, mid, z87, x14, str3, z952222, !(chatData instanceof ChatData.Group) ? uVar2222 == null ? Boolean.valueOf(uVar2222.f11518f) : null : null, str); } else if (!z86) { if (!(chatData instanceof ChatData.Memo)) { throw new NoWhenBranchMatchedException(); } z37 = false; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData22222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t1422222 = chatData.t(); boolean z9522222 = !x0Var.f94791e; b80.u uVar22222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData22222, F2, w2Var, t1422222, mid, z87, x14, str3, z9522222, !(chatData instanceof ChatData.Group) ? uVar22222 == null ? Boolean.valueOf(uVar22222.f11518f) : null : null, str); } } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t14222222 = chatData.t(); boolean z95222222 = !x0Var.f94791e; b80.u uVar222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData222222, F2, w2Var, t14222222, mid, z87, x14, str3, z95222222, !(chatData instanceof ChatData.Group) ? uVar222222 == null ? Boolean.valueOf(uVar222222.f11518f) : null : null, str); } else { throw new NoWhenBranchMatchedException(); } } z34 = z56; if (!z94) { } if (!z86) { } if (!z94) { } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData2222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t142222222 = chatData.t(); boolean z952222222 = !x0Var.f94791e; b80.u uVar2222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData2222222, F2, w2Var, t142222222, mid, z87, x14, str3, z952222222, !(chatData instanceof ChatData.Group) ? uVar2222222 == null ? Boolean.valueOf(uVar2222222.f11518f) : null : null, str); } } z29 = true; if (z94) { } z34 = z56; if (!z94) { } if (!z86) { } if (!z94) { } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData22222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t1422222222 = chatData.t(); boolean z9522222222 = !x0Var.f94791e; b80.u uVar22222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData22222222, F2, w2Var, t1422222222, mid, z87, x14, str3, z9522222222, !(chatData instanceof ChatData.Group) ? uVar22222222 == null ? Boolean.valueOf(uVar22222222.f11518f) : null : null, str); } z27 = false; if (!z94) { } if (z86) { } z29 = true; if (z94) { } z34 = z56; if (!z94) { } if (!z86) { } if (!z94) { } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData222222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t14222222222 = chatData.t(); boolean z95222222222 = !x0Var.f94791e; b80.u uVar222222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData222222222, F2, w2Var, t14222222222, mid, z87, x14, str3, z95222222222, !(chatData instanceof ChatData.Group) ? uVar222222222 == null ? Boolean.valueOf(uVar222222222.f11518f) : null : null, str); } } z17 = true; z18 = chatData instanceof ChatData.Room; if (z18) { } if (z19) { } if (z94) { } if (z86) { } if (!z86) { } z27 = false; if (!z94) { } if (z86) { } z29 = true; if (z94) { } z34 = z56; if (!z94) { } if (!z86) { } if (!z94) { } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData2222222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t142222222222 = chatData.t(); boolean z952222222222 = !x0Var.f94791e; b80.u uVar2222222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData2222222222, F2, w2Var, t142222222222, mid, z87, x14, str3, z952222222222, !(chatData instanceof ChatData.Group) ? uVar2222222222 == null ? Boolean.valueOf(uVar2222222222.f11518f) : null : null, str); } } z16 = true; if (z94) { } z17 = true; z18 = chatData instanceof ChatData.Room; if (z18) { } if (z19) { } if (z94) { } if (z86) { } if (!z86) { } z27 = false; if (!z94) { } if (z86) { } z29 = true; if (z94) { } z34 = z56; if (!z94) { } if (!z86) { } if (!z94) { } z37 = true; if (z94) { } z38 = true; if (!z86) { } MenuActionAvailabilityData menuActionAvailabilityData22222222222 = new MenuActionAvailabilityData(true, z16, z17, z24, z25, z26, z27, z28, z29, z34, z35, z36, z88, z37, z38, z44); int t1422222222222 = chatData.t(); boolean z9522222222222 = !x0Var.f94791e; b80.u uVar22222222222 = x0Var.f94795i; chatMenuData = new ChatMenuData(d14, str2, g14, menuActionAvailabilityData22222222222, F2, w2Var, t1422222222222, mid, z87, x14, str3, z9522222222222, !(chatData instanceof ChatData.Group) ? uVar22222222222 == null ? Boolean.valueOf(uVar22222222222.f11518f) : null : null, str); } if (chatMenuData != null) { h43.q qVar = this.X; if (qVar != null) { qVar.m(); qVar.j(); } ChatHistoryRequest chatHistoryRequest = this.f93765v; startActivityForResult(z1.g.f(new Intent(this, ChatMenuActivity.class), new d1(chatMenuData, this.F)), (chatHistoryRequest == null || !chatHistoryRequest.d()) ? 25 : 26); } } } public void T8(jp.naver.line.android.activity.chathistory.dialog.e eVar) { if (eVar != null && this.f93769z != null && this.Q != null) { this.f93753j.post(new ph.i(this, eVar, 4)); } } public final void U8() { fd3.e eVar; ChatData q14; sc3.o oVar; if (this.f93765v != null) { V8(); n9(); h43.q qVar = this.X; if (qVar != null) { qVar.f79179e.w(); } j0 j0Var = this.f93769z; c2 c2Var = j0Var.f94314q; if (!(c2Var == null || !c2Var.f93977i.get() || (oVar = c2Var.f93974f) == null)) { c2Var.f(oVar); } if (j0Var.f94312o) { m53.a.e().i(j0Var); m53.a.e().h(j0Var, j0Var.f94300c); } j0Var.f94298a.y8().c(j0Var.f94321x); j0Var.f94298a.f93755l.c(j0Var.f94319v); j0Var.r(false, r0.f94551b); a33.r e14 = j0Var.f94316s.e(); if (e14 != null) { e14.p0(true); } this.V1 = true; h43.q qVar2 = this.X; if (qVar2 != null && qVar2.h()) { g0.b().start(); } this.N3 = new e(this); this.f93755l.b(new o23.j(this.E.f93887a)); this.C.l(); ((mk0.e) rb.a.d(this, mk0.e.f112594b)).c(new i.a(this.f93765v.f93782b), new i.c(this.f93765v.f93782b)); h.f149432c.f149435b.c("jp.naver.line.android.notification.tag.chat", this.f93765v.f93782b.hashCode(), -1, null); String str = this.f93765v.f93782b; if (this.f93766w) { this.f93766w = false; this.R.a(n53.d.a(this, str)); } if (this.f93767x) { this.f93767x = false; ChatHistoryRequest chatHistoryRequest = this.f93765v; if (chatHistoryRequest != null && (eVar = this.S3) != null && (q14 = eVar.f71871p.q(chatHistoryRequest.f93782b)) != null) { String d14 = q14.d(); if (H8() instanceof ChatData.Group) { v b14 = this.N.b(d14); if (!(b14 != null && b14.f11533e)) { this.f93754k.c(this, getString(R.string.chathistory_groupcall_confirm_cant)); return; } } if (!l.f() || !TextUtils.equals(d14, l.b())) { int i14 = d.f93773a[this.S3.f71874s.f181008f.d(q14.d()).ordinal()]; if (i14 == 1) { this.f93754k.d(this, R.string.chathistory_groupcall_confirm_join, d14, false); } else if (i14 == 2) { this.f93754k.d(this, R.string.chathistory_groupcall_confirm_join, d14, true); } else if (i14 == 3 || i14 == 4) { this.f93754k.f(this, getString(R.string.chathistory_groupcall_confirm_start), d14); } } else { cc3.a.d(this, d14, l.d()); } } } } } public void V8() { if (this.f93765v != null && this.S3 != null) { ((ny.b) rb.a.d(this, ny.b.f120262n2)).c(this.f93765v.f93782b, hashCode()); u.f98488a.execute(new v1(this, this.f93765v, new b4(this, this.S3.A))); try { new ta3.a(this).a().c(kn.a.f103221a); } catch (ClassCastException unused) { } } } public final void W8(String str) { x0 x0Var = this.E.f93887a; if (x0Var != null && str.equals(x0Var.d())) { this.f93753j.post(new v10.a(this, 11)); } } public x0 X8() { x0 x0Var; o70.u uVar = (o70.u) rb.a.d(this, o70.u.f121553c); a1 a1Var = this.E; fd3.e eVar = this.S3; ChatHistoryRequest chatHistoryRequest = this.f93765v; ld3.a aVar = this.T3; w92.c cVar = this.f93755l; Objects.requireNonNull(a1Var); synchronized (a1.class) { x0Var = a1Var.f93887a; ChatHistoryRequest chatHistoryRequest2 = x0Var != null ? x0Var.f94788b : null; boolean z14 = false; if (chatHistoryRequest2 != null) { if (chatHistoryRequest != null) { if (chatHistoryRequest2.f93782b.equals(chatHistoryRequest.f93782b) && chatHistoryRequest2.f93783c == chatHistoryRequest.f93783c) { z14 = true; } } } if (z14) { x0Var.f94802p = new gk3.a(); } else { x0Var = null; } } if (x0Var == null) { x0 x0Var2 = new x0(this, eVar, chatHistoryRequest, aVar, cVar); z0.e(this, x0Var2, uVar, cVar); a1Var.f93887a = x0Var2; a1Var.f93888b = new t50.b(x0Var2); x0Var = x0Var2; } else { z0.e(this, x0Var, uVar, cVar); } a1.f93886c = a1Var; return x0Var; } /* JADX WARNING: Code restructure failed: missing block: B:16:0x0033, code lost: if (r7 < 0) goto L_0x0052; */ /* JADX WARNING: Code restructure failed: missing block: B:20:0x003f, code lost: if (r7 < 0) goto L_0x0052; */ /* JADX WARNING: Code restructure failed: missing block: B:24:0x004b, code lost: if (r7 < 0) goto L_0x0052; */ public final void Y8(pa3.b bVar, ChatData chatData) { int i14; m2 m2Var; if (this.f93747c4) { this.f93747c4 = false; return; } x I8 = I8(); boolean z14 = I8 != null && I8.a(); boolean z15 = !this.f93752h4; em3.q.f(bVar, "tracker"); Pair[] pairArr = new Pair[1]; l2 l2Var = l2.USER_AMOUNT_EXCLUDING_MYSELF; boolean z16 = chatData instanceof ChatData.Single; if (z16) { i14 = 1; } else { if (chatData instanceof ChatData.Group) { i14 = chatData.t() - 1; } else if (chatData instanceof ChatData.Room) { i14 = chatData.t() - 1; } else if (chatData instanceof ChatData.Square) { i14 = chatData.t() - 1; } else if (!(chatData instanceof ChatData.Memo)) { throw new NoWhenBranchMatchedException(); } i14 = 0; } pairArr[0] = TuplesKt.to(l2Var, String.valueOf(i14)); Map l14 = g0.l(pairArr); boolean z17 = chatData instanceof ChatData.Memo; if (z17) { l14.put(l2.FIRST_PAGE_VIEW_FOR_KEEP_MEMO, String.valueOf(z15)); } boolean z18 = chatData instanceof ChatData.Square; if (z18) { String str = ((ChatData.Square) chatData).f97529d; if (str == null) { str = NetworkManager.TYPE_NONE; } l14.put(l2.SQUARE_MID, str); l14.put(l2.CHAT_MID, chatData.d()); } l3.r a14 = l3.r.Companion.a(chatData.g(), z14); if (z16) { m2Var = z14 ? m2.CHATROOM_OA : m2.CHATROOM_1ON1; } else if (chatData instanceof ChatData.Group) { m2Var = m2.CHATROOM_GROUP; } else if (chatData instanceof ChatData.Room) { m2Var = m2.CHATROOM_1N; } else if (z18) { m2Var = m2.CHATROOM_SQUARE; } else if (z17) { m2Var = m2.CHATROOM_KEEP; } else { throw new NoWhenBranchMatchedException(); } bVar.b(new a.f(a14, m2Var, l14)); this.f93752h4 = true; } public final void Z8() { f fVar; x I8; ChatData H8 = H8(); if (H8 == null) { this.I3.offer(new tm.c0(this, 9)); } else if (!(H8() instanceof ChatData.Single) || (I8 = I8()) == null || I8.b()) { if (H8 instanceof ChatData.Single) { x I82 = I8(); if (I82 == null || !I82.a()) { fVar = new f("chats_room", null, null); } else { GACustomDimensions gACustomDimensions = new GACustomDimensions(); gACustomDimensions.put(ga3.o.OA_MID.d(), I82.getMid()); fVar = new f("chats_oaroom", gACustomDimensions, null); } } else if (H8 instanceof ChatData.Group) { v b14 = this.N.b(H8.d()); fVar = new f(b14 != null && b14.f11533e ? "chats_grouproom" : "chats_grouproomx", null, null); } else if (H8 instanceof ChatData.Room) { fVar = new f("chats_1nroom", null, null); } else if (H8 instanceof ChatData.Square) { ChatData.Square square = (ChatData.Square) H8; if (square.N()) { fVar = new f("chats_square_room", null, null); } else { String str = square.O() ? "open" : "openx"; GACustomDimensions gACustomDimensions2 = new GACustomDimensions(); gACustomDimensions2.put(ga3.o.TYPE_OF_SQUARE_GROUP_CHAT.d(), str); fVar = new f("chats_square_grouproom", gACustomDimensions2, null); } } else if (H8 instanceof ChatData.Memo) { fVar = new f("chats_keepchatroom", null, null); } else { throw new IllegalStateException(H8 + " type is not supported"); } fa3.i.c().p(fVar.f93778a, fVar.f93779b, null, false, null); } else { fa3.i.c().p("chats_room_single_not_friend", null, null, false, null); } } public final void a9() { x0 x0Var = this.E.f93887a; if (x0Var != null) { x0Var.b(); ChatData chatData = x0Var.f94790d; if (chatData != null) { if (chatData instanceof ChatData.Memo) { ChatData.Memo memo = (ChatData.Memo) chatData; a3 a3Var = this.P; Objects.requireNonNull(a3Var); em3.q.f(memo, "chatData"); a3Var.f93891a.h("line.chatroom.view", g0.j(TuplesKt.to(zq0.c.QUERY_KEY_PAGE, "chatroom"), TuplesKt.to("roomType", "k"), TuplesKt.to("roomId", memo.f97455a)), false); return; } return; } } this.I3.offer(new u3.a0(this, 8)); } public void b9(jp.naver.line.android.activity.chathistory.dialog.e eVar) { int i14; if (!eVar.l()) { eVar.equals(jp.naver.line.android.activity.chathistory.dialog.e.INVALID); } this.f93746b4.setValue(Boolean.valueOf(eVar.l())); z23.d e14 = this.f93769z.e(); boolean l14 = eVar.l(); String str = null; if (!l14 && e14 != null) { e14.n(jp.naver.line.android.activity.chathistory.dialog.e.INVALID, this); e14.f197332r = null; } h43.q qVar = this.X; qVar.f79191q.x(l14); if (l14) { qVar.j(); } this.C.k(eVar); jp.naver.line.android.activity.chathistory.dialog.x d14 = eVar.d(); int c14 = (!l14 || e14 == null) ? 0 : e14.f197325k.c(); f43.i iVar = l14 ? ((x.a) d14).f94196a : null; f43.f fVar = this.A; if (fVar != null) { fVar.a(iVar, c14, this.R3); } x.a aVar = (x.a) d14; boolean z14 = l14 && aVar.f94196a.B(); f43.i iVar2 = z14 ? aVar.f94196a : null; if (iVar2 != null) { str = iVar2.r(this, c14); } this.f93745a4.b(z14, str); jp.naver.line.android.activity.chathistory.dialog.e eVar2 = jp.naver.line.android.activity.chathistory.dialog.e.SCREENSHOT; this.f93769z.f94322y.f197290c = eVar != eVar2; if (this.Y != null) { if (eVar.l()) { this.Y.A.f185523a.clear(); } boolean z15 = eVar == eVar2; y43.d dVar = this.Y; dVar.f185506x = z15; if (z15) { Objects.requireNonNull(y43.a.Companion); for (y43.a aVar2 : y43.a.d()) { dVar.d(aVar2, false); } } else { dVar.e(false); } } if (eVar == jp.naver.line.android.activity.chathistory.dialog.e.SCREENSHOT) { i14 = 14; } else { try { i14 = getPackageManager().getActivityInfo(getComponentName(), 0).screenOrientation; } catch (PackageManager.NameNotFoundException unused) { i14 = -1; } } setRequestedOrientation(i14); T8(eVar); this.f93769z.l(); y yVar = this.f93760q; if (yVar != null) { rb.a.m(yVar.a(), !eVar.l()); yVar.f94828p = eVar; } h43.q qVar2 = this.X; if (!(qVar2 == null || eVar == jp.naver.line.android.activity.chathistory.dialog.e.INVALID || !qVar2.f79180f.f())) { qVar2.f79180f.a(); } } public boolean c9() { return this.X.M(); } public void d9(StickerInfo stickerInfo) { String str; boolean z14 = !this.X.a(); this.X.V(false); k81.e eVar = stickerInfo.f42373j; String str2 = stickerInfo.f42372i; fa2.c cVar = this.M; long j14 = stickerInfo.f42366c; long j15 = stickerInfo.f42367d; long j16 = stickerInfo.f42365b; if (eVar == null) { str = null; } else { str = eVar.f101087a; } Fragment l14 = cVar.l(j14, j15, j16, str, str2 == null ? "" : str2, z14); androidx.fragment.app.a aVar = new androidx.fragment.app.a(getSupportFragmentManager()); aVar.l(R.id.chathistory_fragment_container, l14, "fragment_tag_edit_message_sticker", 1); aVar.e("fragment_tag_edit_message_sticker"); aVar.f(); } public void e9(String str, FriendTrackingRoute friendTrackingRoute) { dx0.n g14 = dx0.n.f65514u.g(this, str, A8(), false); g14.d(friendTrackingRoute); g14.j(null); } public void f9(String str, String str2) { if (!TextUtils.isEmpty(str)) { m1 m1Var = this.f93754k; Objects.requireNonNull(m1Var); SquareMemberPopupDialogFragment a54 = SquareMemberPopupDialogFragment.a5(str, str2); a54.f56368e = new d1(this); a54.show(getSupportFragmentManager(), (String) null); m1.b<? extends DialogInterface> bVar = new m1.b<>(a54); m1Var.b(); m1Var.f94457b = bVar; } } public Unit g9() { this.f93750f4.a(); return Unit.INSTANCE; } public void h9(String str) { zj3.h hVar; try { hVar = zj3.d.f199582a.c(this, Uri.parse(str), E8()); } catch (zj3.a unused) { hVar = zj3.h.f199602a; } if (!hVar.b() && zj3.c.f199559a.k(str)) { o63.b.a(this, str, null, hVar.a()); } } /* JADX WARNING: Removed duplicated region for block: B:19:0x00a9 */ public void j9(String str, String str2, String str3, VideoPlaybackSyncEvent videoPlaybackSyncEvent) { boolean z14; z23.d e14; ChatData H8 = H8(); if (H8 != null) { String u14 = H8.u(); ChatData.a g14 = H8.g(); int t14 = H8.t(); boolean K8 = K8(); j0 j0Var = this.f93769z; if (!(j0Var == null || (e14 = j0Var.e()) == null)) { ChatData chatData = e14.f197315a; if (!(chatData instanceof ChatData.Square)) { z14 = chatData.J(); boolean z15 = !(H8 instanceof ChatData.Single) && ((ChatData.Single) H8).f97519s.d(); em3.q.f(str, "chatId"); em3.q.f(u14, "myMid"); em3.q.f(g14, "chatType"); em3.q.f(str3, "chatName"); MediaListChatData mediaListChatData = new MediaListChatData(str, u14, null, g14, str3, t14, K8, z14, z15, false, 516); OaMessageEventTracker.SessionId sessionId = this.F; em3.q.f(sessionId, "oaMessageEventSessionId"); Intent intent = new Intent(this, ChatVisualEndPageActivity.class); z1.g.f(intent, new w(mediaListChatData, sessionId, str2, !K8(), false)); intent.putExtra("isSquare", mediaListChatData.d()); intent.putExtra("isSquare", mediaListChatData.d()); intent.addFlags(8388608); intent.addFlags(536870912); if (videoPlaybackSyncEvent != null) { intent.putExtra("videoPlaybackSyncEvent", videoPlaybackSyncEvent); } startActivityForResult(intent, 4); } } z14 = false; if (!(H8 instanceof ChatData.Single)) { } em3.q.f(str, "chatId"); em3.q.f(u14, "myMid"); em3.q.f(g14, "chatType"); em3.q.f(str3, "chatName"); MediaListChatData mediaListChatData2 = new MediaListChatData(str, u14, null, g14, str3, t14, K8, z14, z15, false, 516); OaMessageEventTracker.SessionId sessionId2 = this.F; em3.q.f(sessionId2, "oaMessageEventSessionId"); Intent intent2 = new Intent(this, ChatVisualEndPageActivity.class); z1.g.f(intent2, new w(mediaListChatData2, sessionId2, str2, !K8(), false)); intent2.putExtra("isSquare", mediaListChatData2.d()); intent2.putExtra("isSquare", mediaListChatData2.d()); intent2.addFlags(8388608); intent2.addFlags(536870912); if (videoPlaybackSyncEvent != null) { } startActivityForResult(intent2, 4); } } public void k9(boolean z14) { rb.a.m(this.f93760q.a(), !z14); this.V3.h(z14); if (!z14) { Z8(); } } public void l9(f43.i iVar, int i14) { p23.l lVar; f43.f fVar = this.A; if (fVar != null) { fVar.a(iVar, i14, this.R3); p23.k kVar = this.C; if (iVar.B()) { lVar = i14 > 0 ? p23.l.VISIBLE : p23.l.DISABLED; } else { lVar = p23.l.INVISIBLE; } kVar.f125978h.h(lVar); this.f93745a4.b(iVar.B(), iVar.r(this, i14)); } } public void m9(String str, boolean z14) { x0 x0Var = this.C.f125972b.E.f93887a; if (x0Var != null && TextUtils.equals(str, x0Var.d())) { x0Var.f94791e = !z14; } } public void n9() { T t14; p2.a<T> aVar; k.a aVar2; boolean N8 = N8(); h43.q qVar = this.X; if (qVar != null) { boolean z14 = N8 && !m0.b(this); qVar.f79191q.c(z14); qVar.f79179e.C(z14); i43.c cVar = qVar.C; if (!(cVar == null || cVar.f85120j == z14)) { cVar.f85120j = z14; if (cVar.a()) { cVar.c(); } } k43.k kVar = qVar.f79192r; if (kVar.f100578j != z14) { kVar.f100578j = z14; if (kVar.h()) { kVar.l(); } } if (z14) { qVar.l(); qVar.k(); } } p23.k kVar2 = this.C; if (kVar2 != null) { l23.c cVar2 = kVar2.f125976f; if (cVar2.f105375c.f()) { l23.g gVar = cVar2.f105382j; if (!gVar.f105396c && (aVar2 = gVar.f105395b.f105409b) != null) { GroupCallThumbnailContainer groupCallThumbnailContainer = aVar2.f105411a; groupCallThumbnailContainer.setUserThumbnails(groupCallThumbnailContainer.f94004c); } } } AutoSuggestionHelper autoSuggestionHelper = this.U; if (autoSuggestionHelper != null) { autoSuggestionHelper.n(N8); } p9(); j0 j0Var = this.f93769z; if (j0Var != null) { j0Var.f94313p = N8; c2 c2Var = j0Var.f94314q; if (c2Var != null) { c2Var.e(N8); } j0Var.f94316s.f197311b.notifyDataSetChanged(); } dh3.x I8 = I8(); if (I8 != null && I8.a()) { o53.o b14 = o53.o.b(this); long j14 = b14.f121329c; if (j14 == -1) { b14.f121337k = true; } b14.f121333g = j14; b14.f121334h = -1; } o9(); m1.b<? extends DialogInterface> bVar = this.f93754k.f94457b; if (bVar != null && (t14 = bVar.f94459a.get()) != null && (aVar = bVar.f94460b) != null) { aVar.accept(t14); } } public final void o9() { j0 j0Var = this.f93769z; if (j0Var != null) { Handler handler = this.f93753j; Objects.requireNonNull(j0Var); handler.postDelayed(new xq0.e(j0Var, 9), 300); } } @Override // androidx.activity.ComponentActivity, androidx.fragment.app.n public void onActivityResult(int i14, int i15, Intent intent) { OtherActivityConnector otherActivityConnector; Location location; String k14; Bundle extras; String k15; x0 x0Var; ArrayList<MediaItem> j14; Object obj; h43.q qVar; super.onActivityResult(i14, i15, intent); ChatData H8 = H8(); if (!(H8 != null || this.S3 == null || this.T3 == null)) { X8(); H8 = H8(); } if (i14 == 101) { Fragment J2 = getSupportFragmentManager().J("fragment_tag_chat_menu"); if (J2 != null) { J2.onActivityResult(i14, i15, intent); } } else { if (!(H8 == null || (otherActivityConnector = this.f93756m) == null)) { Objects.toString(this); Objects.toString(intent); Uri uri = null; r7 = null; Long l14 = null; r7 = null; r7 = null; b.e eVar = null; r7 = null; Intent intent2 = null; ChatData chatData = null; uri = null; int i16 = 2; if (i14 != 2) { int i17 = 0; if (i14 != 3) { if (i14 != 4) { if (i14 != 5) { if (i14 != 7) { if (i14 != 8) { if (i14 != 13) { if (i14 != 17) { if (i14 != 1115) { switch (i14) { case 19: if (i14 == b.h.f121110a.f121076e && i15 == -1 && intent != null) { eVar = new b.e(intent.getBooleanExtra(cq1.r.key, false)); } if (eVar != null && eVar.f121100a) { otherActivityConnector.f93874a.f93769z.s(); break; } case 20: if (i15 == -1) { List<KeepContentShareModel> y14 = zd0.j.f198851a.y(intent); String k16 = otherActivityConnector.k(); if (k16 != null) { ChatHistoryActivity chatHistoryActivity = otherActivityConnector.f93874a; e eVar2 = chatHistoryActivity.N3; chatHistoryActivity.g9(); i02.b.h(k16, y14, eVar2); OtherActivityConnector.c(); break; } } break; case 21: if (!(i15 != -1 || intent == null || (j14 = MediaPickerHelper.j(intent)) == null)) { Iterator<MediaItem> it3 = j14.iterator(); while (it3.hasNext()) { Objects.toString(it3.next()); } if (!otherActivityConnector.i(j14)) { String k17 = otherActivityConnector.k(); if (k17 == null) { OtherActivityConnector.c(); break; } else { otherActivityConnector.f93874a.g9(); boolean a14 = SquareChatUtils.a(k17); Iterator<T> it4 = j14.iterator(); int i18 = 0; int i19 = 0; while (it4.hasNext()) { i19++; if (it4.next().f93084y) { i18++; } } if (i18 == i19) { i17 = 1; } if (i17 != 0) { i16 = 1; } ArrayList arrayList = new ArrayList(); for (T t14 : j14) { if (t14.h() == 0) { Uri e14 = z1.d.e(t14); if (e14 != null) { if (t14.q()) { obj = new b.AbstractC2746b.a(e14, t14.C); } else if (t14.u()) { obj = new b.AbstractC2746b.d(e14, t14.C); } else { obj = new b.AbstractC2746b.c(e14, t14.C); } arrayList.add(obj == 1 ? 1 : 0); } } else if (t14.h() == 1) { String o14 = t14.o(); if (TextUtils.isEmpty(o14)) { o14 = t14.f93063d; } if (OtherActivityConnector.a(otherActivityConnector.f93874a, rk3.e.a(Uri.parse(o14)))) { arrayList.add(new b.AbstractC2746b.C2747b(Uri.parse(t14.f93063d), t14.G)); } } } Iterator it5 = ((ArrayList) otherActivityConnector.f93880g.a(k17, a14, arrayList, i16)).iterator(); while (it5.hasNext()) { otherActivityConnector.f93875b.A.d((ij3.v) it5.next(), otherActivityConnector.f93874a.N3); } OtherActivityConnector.c(); break; } } } break; case 22: if (i15 == -1 && intent != null) { ClipData clipData = intent.getClipData(); int itemCount = clipData != null ? clipData.getItemCount() : 0; HashSet hashSet = new HashSet(itemCount + 1); Uri data = intent.getData(); if (data != null) { hashSet.add(data); } while (i17 < itemCount) { Uri uri2 = clipData.getItemAt(i17).getUri(); if (uri2 != null && !uri2.equals(data)) { hashSet.add(uri2); } i17++; } if (hashSet.size() == 1) { new kn.k(new OtherActivityConnector.b(null), new OtherActivityConnector.c(null)).c((Uri) hashSet.iterator().next()); break; } else { otherActivityConnector.m(hashSet); break; } } case 23: if (i15 == -1 && intent != null) { zi1.h[] hVarArr = ChooseDeviceContactActivity.f96624o; String stringExtra = intent.getStringExtra("extra-vCard"); String stringExtra2 = intent.getStringExtra("extra-display-name"); if (!TextUtils.isEmpty(stringExtra) && !TextUtils.isEmpty(stringExtra2)) { Optional<String> b14 = otherActivityConnector.b(); if (!TextUtils.isEmpty(b14.orElse(null))) { otherActivityConnector.f(); otherActivityConnector.f93874a.g9(); otherActivityConnector.f93875b.A.d(new v.d(stringExtra, stringExtra2, b14.get(), null), otherActivityConnector.f93874a.N3); break; } } } break; case 24: if (i15 == -1) { if (intent != null) { Long valueOf = Long.valueOf(intent.getLongExtra("extra-selected-local-message-id", -1)); if (valueOf.longValue() >= 0) { i17 = 1; } if (i17 != 0) { l14 = valueOf; } } if (l14 != null) { this.f93753j.postDelayed(new ok.n(otherActivityConnector, l14, 5), 200); break; } } break; case 26: if (i15 == -1 && intent != null) { if (intent.getBooleanExtra("EXTRA_IS_CHAT_HISTORY_CLEARED", false)) { otherActivityConnector.f93874a.f93755l.b(new o23.d(otherActivityConnector.k())); } if (intent.getBooleanExtra("EXTRA_IS_USER_NAME_CHANGED", false) && (qVar = otherActivityConnector.f93874a.X) != null) { qVar.v(); break; } } } } else { ArrayList<MediaItem> k18 = MediaPickerHelper.k(i14, i15, intent); if (k18 != null && k18.size() > 0) { String str = k18.get(0).F; intent2 = (str == null || TextUtils.isEmpty(str)) ? h51.a.f(this, k18) : h51.a.i(this, str, ""); } if (intent2 != null) { startActivity(intent2); } } } else if (i15 == 100) { finish(); } } else if (i15 == -1) { cf[] cfVarArr = ChooseMemberActivity.I; String[] stringArrayExtra = intent != null ? intent.getStringArrayExtra("mids") : null; if (stringArrayExtra != null && stringArrayExtra.length > 0) { otherActivityConnector.l(stringArrayExtra[0], null); } } } else if (i15 == -1) { ArrayList<MediaItem> j15 = MediaPickerHelper.j(intent); if (!otherActivityConnector.g(j15)) { MediaItem mediaItem = j15.get(0); if (otherActivityConnector.d(null, mediaItem)) { otherActivityConnector.r(mediaItem); } } else { Uri data2 = (intent == null || intent.getData() == null) ? null : intent.getData(); if (data2 != null && otherActivityConnector.d(data2, null)) { otherActivityConnector.q(data2); } } } } if (i15 == -1 && intent != null) { zi1.h[] hVarArr2 = ChatSettingsActivity.S; if (intent.getBooleanExtra("extra_changed_skin", false)) { x0 x0Var2 = otherActivityConnector.f93874a.E.f93887a; if (x0Var2 != null) { x0Var2.b(); chatData = x0Var2.f94790d; } if (chatData != null) { otherActivityConnector.f93874a.X8(); otherActivityConnector.f93874a.n9(); } } if (intent.getBooleanExtra("extra_deleted_history", false)) { otherActivityConnector.f93874a.f93755l.b(new o23.d(otherActivityConnector.k())); } } } else if (i15 == -1) { ChatMemberListActivity.a aVar = ChatMemberListActivity.f93832u; String[] a15 = ChatMemberListActivity.a.a(intent); x0 x0Var3 = this.E.f93887a; if (x0Var3 != null) { List<dh3.x> e15 = x0Var3.e(); ik0.a a16 = ((fk0.c) rb.a.d(this, fk0.c.f72299y0)).a(); if (e15 == null) { e15 = OtherActivityConnector.f93873h; } HashSet hashSet2 = new HashSet(e15.size() + 1); for (dh3.x xVar : e15) { hashSet2.add(xVar.getMid()); } if (a16 != null) { hashSet2.add(a16.f88072b); } int size = a15 != null ? hashSet2.size() + a15.length : hashSet2.size(); ChatData chatData2 = x0Var3.f94790d; if (chatData2 != null) { jp.naver.line.android.activity.choosemember.b a17 = jp.naver.line.android.activity.choosemember.b.a(chatData2 instanceof ChatData.Group ? b.EnumC1472b.GROUP : b.EnumC1472b.CHAT); if (a17 != null && size > a17.f94967a) { ChatHistoryActivity chatHistoryActivity2 = otherActivityConnector.f93874a; vd3.f.l(chatHistoryActivity2, a17.b(chatHistoryActivity2.getResources(), size), null); } else if (!(otherActivityConnector.f93874a.isFinishing() || a15 == null || a15.length == 0 || (x0Var = otherActivityConnector.f93874a.E.f93887a) == null)) { ArrayList arrayList2 = new ArrayList(Arrays.asList(a15)); String d14 = x0Var.d(); ChatData chatData3 = x0Var.f94790d; if (chatData3 != null) { if (chatData3 instanceof ChatData.Room) { otherActivityConnector.f93874a.f135513e.k(); ((Executor) ij3.o.a().f87912b).execute(new jj3.u(d14, arrayList2, new o4(otherActivityConnector, otherActivityConnector.f93874a.f93753j), (fk0.c) rb.a.d(otherActivityConnector.f93874a, fk0.c.f72299y0))); } else if (chatData3 instanceof ChatData.Single) { arrayList2.add(d14); otherActivityConnector.f93874a.f135513e.k(); new xb3.e(fd3.b.MAIN).i(arrayList2, otherActivityConnector.f93874a.f93753j, new n4(otherActivityConnector)); } else if (chatData3 instanceof ChatData.Group) { x0 x0Var4 = otherActivityConnector.f93874a.E.f93887a; if (x0Var4 != null) { List<String> list = x0Var4.f94800n; i17 = (list == null || list.size() <= 0) ? 1 : x0Var4.f94800n.size() + 1; } int length = a15.length + i17; jp.naver.line.android.activity.choosemember.b a18 = jp.naver.line.android.activity.choosemember.b.a(b.EnumC1472b.GROUP); if (length > a18.f94967a) { ChatHistoryActivity chatHistoryActivity3 = otherActivityConnector.f93874a; ke3.c.e(chatHistoryActivity3, null, a18.b(chatHistoryActivity3.getResources(), length), null); } else { otherActivityConnector.f93874a.f135513e.k(); o70.u uVar = otherActivityConnector.f93876c; HashSet hashSet3 = new HashSet(arrayList2); Objects.requireNonNull(uVar); em3.q.f(d14, "groupId"); zw2.a0 g14 = ck1.n.g(null, new e0(uVar, d14, hashSet3, null), 1); y92.e eVar3 = new y92.e(new f12.f(otherActivityConnector, 2), null, null, 6); g14.e(eVar3); otherActivityConnector.f93879f.a(eVar3); } } } } } } } } else if (i15 == -1) { ArrayList<MediaItem> j16 = MediaPickerHelper.j(intent); if (!otherActivityConnector.g(j16) && !otherActivityConnector.i(j16)) { otherActivityConnector.o(j16); } } } else if (i15 == -1) { ArrayList<MediaItem> j17 = MediaPickerHelper.j(intent); if (otherActivityConnector.g(j17)) { if (!(intent == null || intent.getData() == null)) { uri = intent.getData(); } if (!(uri == null || (k15 = otherActivityConnector.k()) == null)) { otherActivityConnector.n(k15, uri, false, false); OtherActivityConnector.c(); } } else if (!otherActivityConnector.i(j17)) { otherActivityConnector.o(j17); } } } else if (i15 == -1) { if (intent != null && (extras = intent.getExtras()) != null && extras.containsKey("latitude") && extras.containsKey("logitude")) { location = new Location(extras.getBoolean("hasName") ? extras.getString("name") : null, extras.getString("address"), extras.getString("phone"), new e.a(extras.getInt("latitude"), extras.getInt("logitude")), extras.getString("category"), extras.getString("provider")); } else { location = null; } if (!(location == null || (k14 = otherActivityConnector.k()) == null)) { otherActivityConnector.f93874a.g9(); otherActivityConnector.f93875b.A.d(new v.j(location, k14, null), otherActivityConnector.f93874a.N3); OtherActivityConnector.c(); } } } j0 j0Var = this.f93769z; Objects.requireNonNull(j0Var); if (i14 == 4 && i15 == -1 && intent != null) { j0Var.f94322y.f197291d = (VideoPlaybackSyncEvent) intent.getParcelableExtra("videoPlaybackSyncEvent"); } } if (i15 == -1) { this.X3 = com.linecorp.line.timeline.utils.w.a(intent); } } @Override // androidx.activity.ComponentActivity, r13.c, od3.d public void onBackPressed() { if (!G8()) { super.onBackPressed(); } } @Subscribe(SubscriberType.MAIN) public void onBackgroundImageChanged(o23.c cVar) { p9(); } @Override // androidx.appcompat.app.g, androidx.fragment.app.n public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); boolean z14 = this.S; boolean N8 = N8(); this.S = N8; if (z14 != N8) { n9(); } y yVar = this.f93760q; if (yVar != null) { yVar.f94827o.e(); } } /* JADX WARNING: Removed duplicated region for block: B:16:0x00a9 */ /* JADX WARNING: Removed duplicated region for block: B:17:0x00b1 */ /* JADX WARNING: Removed duplicated region for block: B:45:0x00fe */ /* JADX WARNING: Removed duplicated region for block: B:46:0x0107 */ /* JADX WARNING: Removed duplicated region for block: B:55:0x012a */ /* JADX WARNING: Removed duplicated region for block: B:56:0x0138 */ /* JADX WARNING: Removed duplicated region for block: B:59:0x0157 */ /* JADX WARNING: Removed duplicated region for block: B:60:0x0162 */ @Override // androidx.activity.ComponentActivity, a2.f, r13.c, androidx.fragment.app.n, od3.d public void onCreate(Bundle bundle) { ChatHistoryRequest chatHistoryRequest; boolean z14; Pair pair; boolean z15; ld3.a aVar; ChatHistoryRequest chatHistoryRequest2; v2 v2Var; char c14; LiveData liveData; g gVar; ChatHistoryRequest chatHistoryRequest3; ChatHistoryRequest chatHistoryRequest4; ChatHistoryRequest chatHistoryRequest5; this.H3 = System.currentTimeMillis(); super.onCreate(bundle); if (this.f135516h) { qq.i iVar = (qq.i) rb.a.d(this, qq.i.f134162x2); fk0.c cVar = (fk0.c) rb.a.d(this, fk0.c.f72299y0); og3.b bVar = this.f93758o; em3.q.f(bVar, "drawableFactory"); this.f93759p = ((wd2.b) rb.a.d(this, wd2.b.f176717a)).a(this, new wd2.f(this, bVar, null, 4)); jp.naver.line.android.util.r.b(this); ViewGroup viewGroup = (ViewGroup) getLayoutInflater().inflate(R.layout.chathistory, (ViewGroup) null); setContentView(viewGroup); getWindow().getDecorView().setSystemUiVisibility(SenseTimeSlam.MAX_PREVIEW_WIDTH_UPPER_S); viewGroup.findViewById(R.id.chathistory_content_container).addOnLayoutChangeListener(new a(this)); View findViewById = viewGroup.findViewById(R.id.chathistory_main_content_area); this.f93754k.f94456a = findViewById; LineNelo.markCustomLog(); boolean isLoggedIn = iVar.isLoggedIn(); this.V2 = isLoggedIn; if (!isLoggedIn) { startActivity(new Intent(this, SplashActivity.class)); finish(); return; } Intent intent = getIntent(); if (bundle != null) { try { chatHistoryRequest = (ChatHistoryRequest) bundle.getParcelable("chatHistoryRequest.request"); } catch (BadParcelableException unused) { } z14 = true; if (chatHistoryRequest == null) { pair = new Pair(chatHistoryRequest, Boolean.FALSE); } else { try { chatHistoryRequest5 = (ChatHistoryRequest) intent.getParcelableExtra("chatHistoryRequest.extra"); } catch (BadParcelableException unused2) { chatHistoryRequest5 = null; } pair = new Pair(chatHistoryRequest5, Boolean.valueOf(chatHistoryRequest5 != null)); } this.f93765v = (ChatHistoryRequest) pair.getFirst(); boolean booleanValue = ((Boolean) pair.getSecond()).booleanValue(); this.f93768y = booleanValue; this.f93766w = !booleanValue && (chatHistoryRequest4 = this.f93765v) != null && chatHistoryRequest4.f93793m; this.f93767x = !booleanValue && (chatHistoryRequest3 = this.f93765v) != null && chatHistoryRequest3.f93794n; this.U3 = bundle == null ? (z1) bundle.getSerializable("messageInputPermissionAction") : null; ChatHistoryRequest chatHistoryRequest6 = this.f93765v; z15 = chatHistoryRequest6 == null && chatHistoryRequest6.d(); this.S3 = b2.f.e(this, z15); this.N = (q) rb.a.d(this, q.f121544c); if (!z15) { aVar = new nd3.a((SquareBOsFactory) rb.a.d(this, SquareBOsFactory.f54217i0)); } else { aVar = new md3.a(cVar); } this.T3 = aVar; this.f93756m = new OtherActivityConnector(this, (o70.u) rb.a.d(this, o70.u.f121553c), this.S3, new op.a0(this, 1)); if (bundle == null) { this.F = (OaMessageEventTracker.SessionId) bundle.getParcelable("oaMessageTrackingSessionId"); } else { OaMessageEventTracker o14 = this.S3.o(); Objects.requireNonNull(o14); OaMessageEventTracker.SessionId sessionId = new OaMessageEventTracker.SessionId(System.currentTimeMillis()); o14.f96893e.put(sessionId, new OaMessageEventTracker.f(null, 1)); this.F = sessionId; } wf3.b bVar2 = this.S3.f71871p; ChatHistoryRequest chatHistoryRequest7 = this.f93765v; boolean z16 = chatHistoryRequest7 == null && !bVar2.f(chatHistoryRequest7.f93782b); chatHistoryRequest2 = this.f93765v; if (!(chatHistoryRequest2 == null && chatHistoryRequest2.f93790j) || !z16) { z14 = false; } if (chatHistoryRequest2 != null || z14) { Intent C8 = MainActivity.C8(this); C8.addFlags(268435456); startActivity(C8); finish(); } k23.b bVar3 = new k23.b(tj3.e.d(), this.S3.f71874s, y8(), zy2.a.a(u.f98488a), zy2.a.f202074d, ij3.k.c()); ti3.f fVar = ti3.f.INSTANCE; e60.b f14 = ((t60.c) rb.a.d(this, t60.c.I2)).f(); fa3.i c15 = fa3.i.c(); e.a aVar2 = lk.e.f107200a; lk.e eVar = (lk.e) rb.a.d(this, aVar2); jh3.c g14 = ((lk.e) rb.a.d(this, aVar2)).g(); this.f93751g4 = new r43.a(this); this.R3 = (zi1.n) rb.a.d(this, zi1.n.f199365z3); this.Q3 = (bm0.m) rb.a.d(this, bm0.m.f13520c0); this.C = new p23.k(this, viewGroup, bVar3, g14, this.N, this.f93751g4, c15, this.S3.f71874s, this.R3, f14, iVar.getMid(), this.f93765v.f93782b, z15); this.G = eVar.a(); this.I = (n) rb.a.d(this, n.f188214a); this.J = (bo.c) com.bumptech.glide.c.i(this); this.K = new ye2.c(null, null, null, 7); this.L = (j) rb.a.d(this, j.f197757a); this.B = new u43.a(this, (ViewStub) viewGroup.findViewById(R.id.chathistory_foreground_popup_sticker_view_stub), (ViewStub) viewGroup.findViewById(R.id.chathistory_background_popup_sticker_view_stub), this.J, this.L); if (z15) { v2Var = new s4(this, this.f93765v.f93782b); } else { v2Var = new w2(this, this.S3); } this.f93764u = v2Var; z51.b bVar4 = (z51.b) rb.a.d(this, z51.b.f197722a); this.H = bVar4.q(); p2 p2Var = new p2(this, this.S3, this.I, bVar4.m()); lk3.d dVar = new lk3.d(viewGroup.findViewById(R.id.chathistory_content_container)); this.W3 = dVar; dVar.f107271i.add(new c(this, f14)); oa3.g gVar2 = (oa3.g) b2.g.l(this, oa3.g.f122460g, null); g.b.a(this.W3, gVar2); oa3.d dVar2 = new oa3.d(gVar2, j0.l(), j0.m(), new yh3.e()); new md.i(getBaseContext(), this).c(); h43.q qVar = new h43.q(this, viewGroup, this.S3, this.T3, f14, dVar2, this.R3); this.X = qVar; boolean b14 = dc3.b.b(); qVar.B = b14; if (b14) { c14 = 4; qVar.f79188n.setImeOptions(4); } else { c14 = 4; qVar.f79188n.setImeOptions(1); } y8().c(this.X); this.f93755l.c(this.X); eb.g gVar3 = new eb.g(this, new g(this, 0), (ViewStub) findViewById(R.id.chathistory_background_effect_continuous), (ViewStub) findViewById(R.id.chathistory_background_effect_keyword_driven)); this.O = gVar3; j0 j0Var = new j0(this, this.R3, this.f93765v.f93782b, bundle, viewGroup, gVar3, this.S3, this.T3, this.f93764u, cVar, p2Var, fVar.e(), z15); this.f93769z = j0Var; Object obj = null; um3.g.d(j0Var.f94306i, w0.f166207d, 0, new m0(j0Var, null), 2, null); f14.o(this.f93769z); this.A = new f43.f(this, this.f93769z); this.Q = new q1(findViewById(R.id.chathistory_outside_messages_overlay)); u4 u4Var = new u4(this); this.P3 = u4Var; u4Var.f94675c = (ChatHistorySkinImageView) findViewById(R.id.chathistroy_skin_view); AutoSuggestionHelper autoSuggestionHelper = new AutoSuggestionHelper(false, viewGroup, this.X, (bo.c) com.bumptech.glide.c.i(this), this, dVar2, this.R3); this.U = autoSuggestionHelper; autoSuggestionHelper.I = new AutoSuggestionHelper.b(this.X); autoSuggestionHelper.J = new f(this); getLifecycle().a(this.U); this.X.D = this.U; this.Y = new y43.d(this, this.f93765v.f93782b, (ViewStub) viewGroup.findViewById(R.id.chathistory_scroll_to_position_buttons), this.f93769z, this.S3, this.R3, new y43.e()); d72.a aVar3 = (d72.a) rb.a.d(this, d72.a.f62855h); this.f93762s = aVar3; String str = this.f93765v.f93782b; Objects.requireNonNull(aVar3); em3.q.f(str, zq0.c.QUERY_KEY_MID); e72.g gVar4 = aVar3.f62859d; Objects.requireNonNull(gVar4); Collection<x0> values = gVar4.a().f67204m.values(); ArrayList arrayList = new ArrayList(ql3.q.p(values, 10)); Iterator<T> it3 = values.iterator(); while (it3.hasNext()) { arrayList.add(it3.next().f67278b); } ArrayList arrayList2 = new ArrayList(); Iterator it4 = arrayList.iterator(); while (it4.hasNext()) { Object next = it4.next(); if (next instanceof e72.t) { arrayList2.add(next); } } Iterator it5 = arrayList2.iterator(); while (true) { if (!it5.hasNext()) { break; } Object next2 = it5.next(); if (em3.q.b(((e72.t) next2).f67247g, str)) { obj = next2; break; } } e72.t tVar = (e72.t) obj; if (tVar != null) { bn.a aVar4 = new bn.a((ViewStub) findViewById(R.id.chathistory_things_device_status_viewstub), this.f93762s, tVar.f67257a, tVar.f67246f, (zi1.n) rb.a.d(this, zi1.n.f199365z3)); this.f93761r = aVar4; aVar4.a(a.EnumC0252a.CONNECTING); this.R.a(c7.m.f(this.f93762s.f62859d.a().f67206o.v(yx2.b.a()).z(new a30.b(this, 11), ey2.a.f69950e, ey2.a.f69948c))); } k1.a.j(this, this.L3, new IntentFilter("android.intent.action.USER_PRESENT")); n9(); hi3.i.b(hashCode()); g0 b15 = g0.b(); Objects.requireNonNull(b15); b15.f94260a = new WeakReference(this); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("jp.naver.line.android.common.GROUPHOME_DASHBOARD_UPDATED"); intentFilter.addAction("jp.naver.line.android.common.NOTIFIED_UPDATE_CONTENT_PREVIEW"); k1.a.j(this, this.M3, intentFilter); View view = Build.VERSION.SDK_INT != 24 ? viewGroup : findViewById; ContentResolver contentResolver = getContentResolver(); AutoResetLifecycleScope autoResetLifecycleScope = this.f93748d4; view.setOnDragListener(new qb0.a(this, contentResolver, autoResetLifecycleScope, new r1(this, this.f93756m, this.X, autoResetLifecycleScope, w0.f166207d, new j(this)), "image/*", "video/*")); y8().c(this); this.f93755l.c(this); y8().c(this.f93769z); this.f93755l.c(this.f93769z); o oVar = new o(this, new ao.b(new op.v(this, 2)), new g53.f(this, viewGroup, R.id.chathistory_searchinchat_layout_viewstub, R.id.chathistory_searchinchat_navigation_and_calender_viewstub, this.f93755l, this.R3), this.f93769z, this.C, f14, z15); this.V3 = oVar; f14.o(new n(oVar)); o0.a aVar5 = ak3.o0.f5349b; if (o0.a.a(this)) { this.Z = new y1(); } u uVar = this.f93757n; p23.k kVar = this.C; u43.a aVar6 = this.B; y43.d dVar3 = this.Y; TransferredFileEventHelper transferredFileEventHelper = new TransferredFileEventHelper(this, this.T3); f0 f0Var = new f0(this); o oVar2 = this.V3; y1 y1Var = this.Z; uVar.f94653f = kVar; uVar.f94654g = aVar6; uVar.f94655h = dVar3; uVar.f94656i = transferredFileEventHelper; uVar.f94658k = p2Var; uVar.f94659l = f0Var; uVar.f94660m = oVar2; uVar.f94661n = bVar3; uVar.f94662o = y1Var; ChatHistoryActivity chatHistoryActivity = uVar.f94648a; uVar.f94657j = new s1(chatHistoryActivity.f93755l, ((lk.e) rb.a.d(chatHistoryActivity, lk.e.f107200a)).e(), ((SquareBOsFactory) rb.a.d(uVar.f94648a, SquareBOsFactory.f54217i0)).h()); r3 r3Var = uVar.f94649b; r3Var.f94562c = ""; r3Var.f94561b.clear(); boolean z17 = true; r3Var.f94563d = true; fm.d dVar4 = uVar.f94650c; ChatHistoryActivity chatHistoryActivity2 = uVar.f94648a; Objects.requireNonNull(dVar4); dVar4.f72485b = new t43.a(chatHistoryActivity2); uVar.f94648a.y8().c(aVar6); uVar.f94648a.y8().c(dVar3); uVar.f94648a.f93755l.c(dVar3); uVar.f94648a.y8().c(p2Var); uVar.f94648a.f93755l.c(uVar.f94649b); uVar.f94648a.y8().c(uVar.f94657j); uVar.f94648a.f93755l.c(uVar.f94657j); uVar.f94648a.f93755l.c(f0Var); uVar.f94648a.y8().c(oVar2); uVar.f94648a.f93755l.c(oVar2); if (o0.a.a(uVar.f94648a) && y1Var != null) { uVar.f94648a.f93755l.c(y1Var); } uVar.f94652e = true; yh3.e eVar2 = new yh3.e(); try { new kn.k(jp.naver.line.android.util.h.g(new e(eVar2)), new kn.i(i0.e(new b(this, eVar2)), this.f135517i)).c(kn.a.f103221a); } catch (ClassCastException unused3) { } this.f93764u.e(); this.S = N8(); getLifecycle().a(this.Y3); getLifecycle().a(this.Z3); c.a aVar7 = t60.c.I2; this.f93745a4 = ((t60.c) rb.a.d(this, aVar7)).c((ViewStub) viewGroup.findViewById(R.id.chathistory_message_selection_instruction_stub)); fa2.c cVar2 = (fa2.c) rb.a.d(this, fa2.c.f71544x0); this.M = cVar2; sn.e.e(this, cVar2.j(this), this, new uk1.a(this, 1)); bn.a aVar8 = this.f93761r; if (aVar8 != null) { liveData = aVar8.f13688g; } else { liveData = new androidx.lifecycle.o0(Boolean.FALSE); } LiveData<Boolean> liveData2 = this.f93769z.A; LiveData<Boolean> a14 = this.f93745a4.a(); LiveData<Boolean> liveData3 = this.C.f125971a; androidx.lifecycle.o0<Boolean> o0Var = this.f93746b4; m mVar = new m(this); em3.q.f(liveData2, "liveData1"); em3.q.f(a14, "liveData2"); em3.q.f(liveData, "liveData3"); em3.q.f(liveData3, "liveData4"); em3.q.f(o0Var, "liveData5"); LiveData[] liveDataArr = new LiveData[5]; liveDataArr[0] = liveData2; liveDataArr[1] = a14; liveDataArr[2] = liveData; liveDataArr[3] = liveData3; liveDataArr[c14] = o0Var; new rf2.b(liveData2, a14, liveData, liveData3, o0Var, mVar, liveDataArr).observe(this, new ox.e0(this, 26)); Serializable serializableExtra = getIntent().getSerializableExtra("chatHistoryReferrer.extra"); if (serializableExtra instanceof g) { gVar = (g) serializableExtra; } else { gVar = g.UNKNOWN; } if (this.f93765v.f93782b.equals(iVar.getMid()) && gVar == g.CHAT_LIST) { h70.a d14 = ((t60.c) rb.a.d(this, aVar7)).d(this, this.f93748d4); this.J3 = d14; d14.a(); } String str2 = this.f93765v.I; if (str2 != null) { try { Uri.Builder builder = new Uri.Builder(); Uri.Builder scheme = builder.scheme("https"); String str3 = BuildConfig.LIFF_MAIN_PERMALINK_HOST; em3.q.e(str3, "LIFF_MAIN_PERMALINK_HOST"); scheme.authority(str3).appendPath(str2); zj3.d.f199582a.c(this, builder.build(), E8()); } catch (zj3.a unused4) { } } if (z15) { new SquareChatHistoryInitialScrollController(this.S3.f71876u, this.f93769z, this.f93748d4, this.f93755l, this); new SquarePrefetchTrackingEventSender(this.f93765v.f93782b, this.f93769z.f94310m, this.f93755l, j0.l(), j0.m(), this.f93769z.f94305h, this); new SquareUnavailableChatRecoveryController(this.f93765v.f93782b, ((SquareBOsFactory) rb.a.d(this, SquareBOsFactory.f54217i0)).f(), this.f93755l, this, new ba.q(this, 6), this.f93748d4); } ((u40.b) rb.a.d(this, u40.b.f152860i)).f152867g.observe(this, this.O3); if (bundle == null) { z17 = false; } this.f93752h4 = z17; this.f122776d.f34447d = new o(this, 0); if (bundle == null) { Q8(gVar); return; } return; } chatHistoryRequest = null; z14 = true; if (chatHistoryRequest == null) { } this.f93765v = (ChatHistoryRequest) pair.getFirst(); boolean booleanValue2 = ((Boolean) pair.getSecond()).booleanValue(); this.f93768y = booleanValue2; this.f93766w = !booleanValue2 && (chatHistoryRequest4 = this.f93765v) != null && chatHistoryRequest4.f93793m; this.f93767x = !booleanValue2 && (chatHistoryRequest3 = this.f93765v) != null && chatHistoryRequest3.f93794n; this.U3 = bundle == null ? (z1) bundle.getSerializable("messageInputPermissionAction") : null; ChatHistoryRequest chatHistoryRequest62 = this.f93765v; if (chatHistoryRequest62 == null) { } this.S3 = b2.f.e(this, z15); this.N = (q) rb.a.d(this, q.f121544c); if (!z15) { } this.T3 = aVar; this.f93756m = new OtherActivityConnector(this, (o70.u) rb.a.d(this, o70.u.f121553c), this.S3, new op.a0(this, 1)); if (bundle == null) { } wf3.b bVar22 = this.S3.f71871p; ChatHistoryRequest chatHistoryRequest72 = this.f93765v; if (chatHistoryRequest72 == null) { } chatHistoryRequest2 = this.f93765v; z14 = false; if (chatHistoryRequest2 != null) { } Intent C82 = MainActivity.C8(this); C82.addFlags(268435456); startActivity(C82); finish(); } } @Override // r13.c, androidx.appcompat.app.g, androidx.fragment.app.n public void onDestroy() { y1 y1Var; fd3.e eVar; Map<OaMessageEventTracker.c, OaMessageEventTracker.b> map; if (isFinishing() && (eVar = this.S3) != null) { OaMessageEventTracker o14 = eVar.o(); OaMessageEventTracker.SessionId sessionId = this.F; Objects.requireNonNull(o14); em3.q.f(sessionId, "sessionId"); OaMessageEventTracker.f remove = o14.f96893e.remove(sessionId); if (!(remove == null || (map = remove.f96914a) == null)) { o14.b(map); } } u uVar = this.f93757n; if (uVar.f94652e) { uVar.f94652e = false; uVar.f94648a.f93755l.a(uVar.f94660m); uVar.f94648a.y8().a(uVar.f94660m); uVar.f94648a.f93755l.a(uVar.f94659l); uVar.f94648a.y8().a(uVar.f94657j); uVar.f94648a.f93755l.a(uVar.f94657j); uVar.f94648a.f93755l.a(uVar.f94649b); uVar.f94648a.y8().a(uVar.f94658k); uVar.f94648a.y8().a(uVar.f94655h); uVar.f94648a.f93755l.a(uVar.f94655h); uVar.f94648a.y8().a(uVar.f94654g); ChatHistoryActivity chatHistoryActivity = uVar.f94648a; o0.a aVar = ak3.o0.f5349b; if (o0.a.a(chatHistoryActivity) && (y1Var = uVar.f94662o) != null) { uVar.f94648a.f93755l.a(y1Var); } k23.b bVar = uVar.f94661n; bVar.f100373c.a(bVar); bVar.h(); ij3.k c14 = ij3.k.c(); c14.e(bVar.f100378h); c14.e(bVar.f100379i); p23.k kVar = uVar.f94653f; kVar.f125972b.y8().a(kVar); kVar.f125972b.f93755l.a(kVar); l23.c cVar = kVar.f125976f; cVar.f105374b.y8().a(cVar); p23.o oVar = kVar.f125978h; oVar.f126005k.b(); oVar.f126001g.k(oVar.f126007m); kVar.f125988r.e(); o oVar2 = uVar.f94660m; oVar2.f66872q.onComplete(); oVar2.f66873r.onComplete(); } if (this.f93769z != null) { y8().a(this.f93769z); this.f93755l.a(this.f93769z); } y8().a(this); this.f93755l.a(this); if (this.f93760q != null) { y8().a(this.f93760q); } super.onDestroy(); if (this.V2) { k1.a.r(this, this.L3); u4 u4Var = this.P3; if (u4Var != null) { u4Var.f94674b = null; ChatHistorySkinImageView chatHistorySkinImageView = u4Var.f94675c; if (chatHistorySkinImageView != null) { chatHistorySkinImageView.i(); } } if (this.X != null) { y8().a(this.X); this.f93755l.a(this.X); h43.q qVar = this.X; qVar.f79179e.u(); qVar.f79176b.onDestroy(); i43.c cVar2 = qVar.C; if (cVar2 != null) { cVar2.f85115e.a(cVar2); } } j0 j0Var = this.f93769z; if (j0Var != null) { j0Var.r(false, o0.f94494b); a43.a a14 = a43.a.f2338g.a(((k0) rb.a.d(j0Var.f94298a, k0.f100020a)).a().K.a()); a14.f2341b.removeCallbacks(a14.f2343d); a14.f2344e = null; a14.f2345f = null; Iterator<T> it3 = a14.f2342c.iterator(); while (it3.hasNext()) { it3.next().m(); } a14.f2342c.clear(); a14.f2340a.a(); a43.a.f2339h = null; c2 c2Var = j0Var.f94314q; if (c2Var != null) { c2Var.c(); c2Var.f93973e = null; j2 j2Var = c2Var.f93970b; j2Var.f94353y = null; c2Var.f93974f = null; c2Var.f93979k = false; j2Var.f94351w = null; c2Var.f93971c.f93957e = null; ScheduledExecutorService scheduledExecutorService = c2Var.f93981m; if (scheduledExecutorService != null && !scheduledExecutorService.isShutdown()) { c2Var.f93981m.shutdown(); c2Var.f93981m = null; } } j0Var.f94320w.f170268h.b(); j0Var.C.b(); } vc3.d.c().f170957a.clear(); vc3.a b14 = vc3.d.c().b(8); if (b14 != null) { for (vc3.c cVar3 : b14.keySet()) { b14.remove(cVar3); } } this.f93759p.clear(); hi3.i.f81766b.e(LineApplication.a.a(), hashCode()); g0 b15 = g0.b(); b15.f94260a = null; b15.a(); k1.a.r(this, this.M3); v2 v2Var = this.f93764u; if (v2Var != null) { v2Var.c(); } this.R.b(); } } public void onEnterAnimationComplete() { long j14 = this.X3; if (!(j14 == -1 || this.f93769z == null)) { this.f93753j.post(new c(this, j14)); } this.X3 = -1; } @Subscribe(SubscriberType.MAIN) public void onFinishedResendMessageForE2EE(o23.k kVar) { W8(kVar.f120970a); } @Override // r13.c, androidx.appcompat.app.g public boolean onKeyDown(int i14, KeyEvent keyEvent) { if (i14 == 4) { this.V = true; } return super.onKeyDown(i14, keyEvent); } @Override // r13.c public boolean onKeyUp(int i14, KeyEvent keyEvent) { if (i14 != 4 || keyEvent.isLongPress() || keyEvent.isTracking() || !this.V) { return super.onKeyUp(i14, keyEvent); } this.V = false; return G8(); } @Subscribe(SubscriberType.MAIN) public void onMessageEditFinished(g43.a aVar) { b9(jp.naver.line.android.activity.chathistory.dialog.e.INVALID); this.f135513e.b(); } @Override // r13.c, androidx.fragment.app.n, od3.d public void onPause() { dh3.x I8; u uVar = this.f93757n; if (uVar.f94651d) { uVar.f94651d = false; uVar.f94653f.f125976f.f105375c.h(); o oVar = uVar.f94660m; bx2.c cVar = oVar.f66874s; if (cVar != null) { cVar.dispose(); } oVar.f66874s = null; oVar.f66876u = false; uVar.f94648a.f93755l.a((t43.a) uVar.f94650c.f72485b); } super.onPause(); this.T = false; if (this.V1) { this.V1 = false; h43.q qVar = this.X; if (qVar != null && qVar.s()) { String A8 = A8(); h43.q qVar2 = this.X; String text = qVar2.f79188n.getText() != null ? qVar2.f79188n.getText() : ""; x43.d dVar = qVar2.H; try { new kn.k(new kn.k(new h43.e0(qVar2.F, qVar2.f79175a, new SpannedString(text), dVar != null ? Long.valueOf(dVar.c()) : null), new h43.c()), new h43.c0(A8, this.S3)).c(kn.a.f103221a); } catch (ClassCastException unused) { } } j0 j0Var = this.f93769z; c2 c2Var = j0Var.f94314q; if (c2Var != null) { c2Var.j(); j2 j2Var = c2Var.f93970b; j2Var.e(); Dialog dialog = j2Var.f94345q; if (dialog != null) { try { if (dialog.isShowing()) { j2Var.f94345q.dismiss(); } } catch (IllegalArgumentException unused2) { } catch (Throwable th4) { j2Var.f94345q = null; throw th4; } j2Var.f94345q = null; } } m53.a.e().i(j0Var); j0Var.f94298a.f93755l.a(j0Var.f94319v); j0Var.f94298a.y8().a(j0Var.f94321x); j0Var.r(false, p0.f94509b); u43.a aVar = this.B; if (aVar != null) { aVar.b(); } h43.q qVar3 = this.X; if (qVar3 != null) { qVar3.f79179e.v(); } h70.a aVar2 = this.J3; if (aVar2 != null) { aVar2.dismiss(); } g0.b().e(); if (this.G3.compareAndSet(true, false) && (I8 = I8()) != null && I8.a()) { o53.o b14 = o53.o.b(this); b14.f121328b.clear(); b14.f121329c = -1; b14.f121331e.quit(); b14.f121335i = null; b14.f121336j = null; b14.f121333g = -1; b14.f121334h = -1; o53.o.f121326l = null; } this.f93758o.b(); y yVar = this.f93760q; if (yVar != null) { sk3.c<? extends View> cVar2 = yVar.f94829q; if (cVar2 != null) { cVar2.a(); } yVar.f94829q = null; } } } public void onProvideAssistContent(AssistContent assistContent) { j0 j0Var = this.f93769z; Objects.requireNonNull(j0Var); boolean z14 = false; j0Var.r(false, q0.f94543b); super.onProvideAssistContent(assistContent); if (assistContent != null) { ry.c cVar = new ry.c(); x0 x0Var = this.E.f93887a; if (x0Var != null && cVar.f(this)) { z23.d e14 = this.f93769z.e(); boolean z15 = this.X.s() && !(e14 != null ? e14.f197325k.f197344a.l() : true) && !(this.V3.f66858c.d() != g53.o.INVISIBLE); if (qy.b.a(this) && z15 && x0Var.f94790d != null) { z14 = true; } String str = null; if (z14) { try { mb0.i iVar = new mb0.i(this); String str2 = x0Var.f94790d.I() ? "Individual" : "Group"; String d14 = x0Var.d(); em3.q.e(d14, "chatHistoryContext.chatId"); JSONObject a14 = n4.a.a("conversation_type", str2, "conversation_id", iVar.b(d14)); String e15 = x0Var.f94790d.e(); if (e15 == null) { e15 = ""; } str = a14.put("conversation_name", e15).toString(); } catch (i.a e16) { e16.toString(); } } if (str != null) { assistContent.setStructuredData(str); } } } } @Override // androidx.activity.ComponentActivity, androidx.fragment.app.n public void onRequestPermissionsResult(int i14, String[] strArr, int[] iArr) { z1 z1Var; if (i14 == 1 && (z1Var = this.U3) != null) { this.U3 = null; if (jp.naver.line.android.util.p0.f(strArr, new String[0], iArr, true)) { this.X.o(z1Var); } } } @Override // r13.c, androidx.fragment.app.n, od3.d public void onResume() { o23.n nVar; super.onResume(); boolean a14 = this.Q3.a(); boolean J8 = J8(); w92.c cVar = this.f93755l; if (a14 || J8) { nVar = o23.n.SHOWN; } else { nVar = o23.n.HIDDEN; } cVar.b(nVar); U8(); if (!a14 && J8) { this.T = true; } LineNelo.b(); Z8(); if (0 < this.H3) { fa3.c.d(fa3.k.Api_Event_Performance_TalkRoom_Open, System.currentTimeMillis() - this.H3); this.H3 = 0; } u uVar = this.f93757n; if (uVar.f94652e) { fm.d dVar = uVar.f94650c; uVar.f94648a.f93755l.c((t43.a) dVar.f72485b); o oVar = uVar.f94660m; oVar.f66876u = true; az2.a<String> aVar = oVar.f66872q; bx.q qVar = new bx.q(oVar, 1); Objects.requireNonNull(aVar); zw2.t Z2 = new v0(aVar, qVar).o(300, TimeUnit.MILLISECONDS, oVar.f66862g).Z(new z0(oVar, 3)); n0 n0Var = new n0(oVar.f66873r, 5); dx2.g<? super Throwable> gVar = fx2.a.f74017d; dx2.a aVar2 = fx2.a.f74016c; oVar.f66874s = Z2.w(n0Var, gVar, aVar2, aVar2).V(); uVar.f94653f.f125976f.f105375c.g(); uVar.f94651d = true; } y yVar = this.f93760q; if (yVar != null) { yVar.c(); } } @Override // androidx.activity.ComponentActivity, a2.f public void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); bundle.putParcelable("chatHistoryRequest.request", this.f93765v); bundle.putSerializable("messageInputPermissionAction", this.U3); bundle.putParcelable("oaMessageTrackingSessionId", this.F); j0 j0Var = this.f93769z; if (j0Var != null) { Objects.requireNonNull(j0Var); c2 c2Var = j0Var.f94314q; if (c2Var != null) { bundle.putBoolean("key_should_suppress_liveviewer", c2Var.f93979k); } } } @Subscribe(SubscriberType.MAIN) public void onSendingMessageStatusChangedToSentEvent(o23.r rVar) { W8(rVar.f120983a); } @Override // r13.c, androidx.appcompat.app.g, androidx.fragment.app.n public void onStart() { super.onStart(); v2 v2Var = this.f93764u; if (v2Var != null) { v2Var.b(); } z.e eVar = this.D; if (eVar != null) { eVar.f92285a.invoke(); } fd3.e eVar2 = this.S3; if (eVar2 != null) { r rVar = eVar2.A; String str = this.f93765v.f93782b; l lVar = new l(this); Objects.requireNonNull(rVar); em3.q.f(str, "chatId"); z zVar = rVar.f87924d; ij3.u uVar = new ij3.u(lVar); Objects.requireNonNull(zVar); xy2.e<z.b> eVar3 = zVar.f92225e; jj3.y yVar = new jj3.y(str); Objects.requireNonNull(eVar3); this.D = new z.e(new jj3.a0(new ly2.o(eVar3, yVar).z(new xm1.d(uVar, 1), ey2.a.f69950e, ey2.a.f69948c))); } e80.n nVar = (e80.n) this.O.f67662c; Objects.requireNonNull(nVar.f67425e); um3.g.d(nVar.f67426f, null, 0, new e80.l(nVar, null), 3, null); x0 x0Var = this.E.f93887a; if (x0Var != null) { sc3.m mVar = x0Var.f94789c; if (mVar.f142633d == 3) { mVar.f142633d = 2; } if (mVar.f142635f == 3) { mVar.f142635f = 2; } } a9(); AutoResetLifecycleScope autoResetLifecycleScope = this.f93748d4; String str2 = this.f93765v.f93782b; em3.q.f(autoResetLifecycleScope, "coroutineScope"); em3.q.f(str2, "currentChatId"); um3.g.d(autoResetLifecycleScope, null, 0, new c3(this, str2, null), 3, null); um3.g.d(autoResetLifecycleScope, null, 0, new b3(this, str2, null), 3, null); } @Override // r13.c, androidx.appcompat.app.g, androidx.fragment.app.n public void onStop() { super.onStop(); z.e eVar = this.D; if (eVar != null) { eVar.f92285a.invoke(); } v2 v2Var = this.f93764u; if (v2Var != null) { v2Var.d(); } r43.a aVar = this.f93751g4; if (aVar != null) { int i14 = a.C2576a.$EnumSwitchMapping$0[aVar.f135742c.ordinal()]; if (i14 != 1) { if (i14 == 2) { Objects.requireNonNull(aVar.c()); kh3.d dVar = kh3.d.f102673a; kh3.d.c(); } else if (i14 != 3) { throw new NoWhenBranchMatchedException(); } } } h43.q qVar = this.X; if (qVar != null) { qVar.m(); } j0 j0Var = this.f93769z; Objects.requireNonNull(j0Var); j0Var.r(false, s0.f94571b); } public void onUserLeaveHint() { super.onUserLeaveHint(); this.Y3.a(); } public final void p9() { ChatHistoryRequest chatHistoryRequest = this.f93765v; String str = chatHistoryRequest != null ? chatHistoryRequest.f93782b : null; x0 x0Var = this.E.f93887a; ChatData chatData = x0Var != null ? x0Var.f94790d : null; try { u4 u4Var = this.P3; if (u4Var != null) { u4Var.a(str, chatData, this.C, this.f93769z, this.R3); } } catch (RuntimeException e14) { em3.p.a(4, "level"); int i14 = a.d.$EnumSwitchMapping$0[j.q.e(4)]; if (i14 == 1) { kk0.c cVar = LineNelo.f38112a; if (cVar != null) { cVar.d(c.b.INFO, e14, "ChatHistoryActivity.setSkin", "updateOrientation > setSkin for tracking LINEAND-8506", null); Unit unit = Unit.INSTANCE; } } else if (i14 == 2) { LineNelo.c("ChatHistoryActivity.setSkin", "updateOrientation > setSkin for tracking LINEAND-8506", null, e14); } else if (i14 == 3) { LineNelo.a("ChatHistoryActivity.setSkin", "updateOrientation > setSkin for tracking LINEAND-8506", null, e14); } else if (i14 == 4) { kk0.c cVar2 = LineNelo.f38112a; if (cVar2 != null) { cVar2.d(c.b.FATAL, e14, "ChatHistoryActivity.setSkin", "updateOrientation > setSkin for tracking LINEAND-8506", null); Unit unit2 = Unit.INSTANCE; } } else if (i14 == 5) { kk0.c cVar3 = LineNelo.f38112a; if (cVar3 != null) { cVar3.d(c.b.CRASH, e14, "ChatHistoryActivity.setSkin", "updateOrientation > setSkin for tracking LINEAND-8506", null); Unit unit3 = Unit.INSTANCE; } } else { throw new NoWhenBranchMatchedException(); } } } }