package com.ss.android.ugc.aweme.deeplink;

import X.069;
import X.070;
import X.0HH;
import X.2Pr;
import X.2UX;
import X.2fU;
import X.2nK;
import X.3af;
import X.3i8;
import X.3jJ;
import X.3wF;
import X.46i;
import X.7tw;
import X.86a;
import X.878;
import X.8gF;
import X.9Zo;
import X.C5315Ly6;
import X.C5327LyI;
import X.C5364Lyt;
import X.C5367Lyw;
import X.C5368Lyx;
import X.C5387LzG;
import X.EuI;
import X.Ryr;
import X.S9B;
import X.SNU;
import X.Tpf;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.abmock.SettingsManager;
import com.ss.android.ugc.aweme.AccountService;
import com.ss.android.ugc.aweme.DetailFeedServiceImpl;
import com.ss.android.ugc.aweme.IAccountUserService;
import com.ss.android.ugc.aweme.out.AVExternalServiceImpl;
import com.ss.android.ugc.aweme.services.MainServiceImpl;
import com.ss.android.ugc.aweme.utils.ActivityStack;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class DeepLinkHandlerActivity extends SNU {
    public C5315Ly6 LIZ = new C5315Ly6();
    public Uri LIZIZ;
    public boolean LIZJ = false;
    public boolean LIZLLL = false;
    public String LJ = null;
    public boolean LJFF = false;
    public boolean LJI = false;
    public long LJII = 0;
    public boolean LJIIIIZZ = false;
    public boolean LJIIIZ = false;
    public boolean LJIIJ = false;
    public boolean LJIIJJI = false;
    public ArrayList<String> LJIIL = new ArrayList<>();
    public ArrayList<Intent> LJIILIIL = new ArrayList<>();
    public Intent LJIILJJIL = null;
    public Intent LJIILL = null;
    public boolean LJIILLIIL = false;
    public boolean LJIIZILJ = false;
    public IAccountUserService LJIJ = AccountService.LIZ().LJFF();
    public IDeepLinkService LJIJI = DeepLinkServiceImpl.LJIIJ();
    public String LJIJJ = "";

    static {
        Covode.recordClassIndex(63389);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU, android.app.Activity] */
    public void onPause() {
        8gF.LIZJ(this);
        DeepLinkHandlerActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU, android.app.Activity] */
    public void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity", "onResume", true);
        DeepLinkHandlerActivity.super.onResume();
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU, android.app.Activity] */
    public void onStop() {
        8gF.LIZLLL(this);
        DeepLinkHandlerActivity.super.onStop();
    }

    public void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity", "onWindowFocusChanged", true);
        DeepLinkHandlerActivity.super.onWindowFocusChanged(z);
    }

    public final boolean LIZ() {
        return MainServiceImpl.createIMainServicebyMonsterPlugin(false).isAppHot();
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v0, resolved type: com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v1, resolved type: X.SNU} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r9v2, resolved type: android.app.Activity} */
    /* JADX WARNING: Multi-variable type inference failed */
    /* JADX WARNING: Removed duplicated region for block: B:30:0x00da  */
    /* JADX WARNING: Removed duplicated region for block: B:37:0x00fe  */
    /* JADX WARNING: Removed duplicated region for block: B:40:0x0116  */
    /* JADX WARNING: Removed duplicated region for block: B:71:0x01a0  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public android.content.Intent LIZ(android.net.Uri r17, boolean r18, boolean r19) {
        /*
            r16 = this;
            r4 = r16
            r4 = r4
            r7 = r17
            java.lang.String r1 = r7.getScheme()
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            r3 = 0
            if (r0 == 0) goto L_0x0011
            return r3
        L_0x0011:
            java.lang.String r11 = r7.getHost()
            boolean r0 = android.text.TextUtils.isEmpty(r11)
            if (r0 == 0) goto L_0x001c
            return r3
        L_0x001c:
            com.ss.android.ugc.tiktok.deeplink.IDeepLinkSecurityService r5 = com.ss.android.ugc.tiktok.deeplink.impl.DeeplinkPrefetchImpl.LIZ()
            X.81c r2 = new X.81c
            boolean r0 = r4.LIZLLL
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
            r2.<init>(r7, r0)
            X.81a r0 = r5.LIZ(r2)
            boolean r0 = r0.LJIIIIZZ
            if (r0 == 0) goto L_0x01fc
            java.lang.String r0 = r7.getPath()
            java.lang.String r13 = ""
            if (r0 != 0) goto L_0x01d4
            r12 = r13
        L_0x003c:
            android.content.Intent r0 = r4.getIntent()
            java.lang.String r5 = "from_token"
            java.lang.String r2 = LIZ((android.content.Intent) r0, (java.lang.String) r5)
            boolean r0 = android.text.TextUtils.isEmpty(r2)
            if (r0 == 0) goto L_0x01d1
        L_0x004c:
            android.net.Uri$Builder r6 = r7.buildUpon()
            r6.appendQueryParameter(r5, r13)
            java.lang.String r5 = "enter_from"
            java.lang.String r0 = r7.getQueryParameter(r5)
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x0072
            android.content.Intent r0 = r4.getIntent()
            java.lang.String r0 = LIZ((android.content.Intent) r0, (java.lang.String) r5)
            java.lang.String r2 = "token"
            boolean r0 = android.text.TextUtils.equals(r2, r0)
            if (r0 == 0) goto L_0x01c3
            r6.appendQueryParameter(r5, r2)
        L_0x0072:
            android.net.Uri r10 = r6.build()
            r6 = 0
            com.ss.android.ugc.aweme.services.IMainService r0 = com.ss.android.ugc.aweme.services.MainServiceImpl.createIMainServicebyMonsterPlugin(r6)
            java.util.List r0 = r0.getDeeplinkCommands()
            java.util.Iterator r2 = r0.iterator()
        L_0x0083:
            boolean r0 = r2.hasNext()
            r5 = 1
            if (r0 == 0) goto L_0x01c0
            java.lang.Object r8 = r2.next()
            X.FLH r8 = (X.FLH) r8
            boolean r0 = r8.LIZ(r10, r1, r11, r12)
            if (r0 == 0) goto L_0x0083
            java.lang.StringBuilder r0 = new java.lang.StringBuilder
            r0.<init>()
            r0.append(r11)
            r0.append(r12)
            java.lang.String r1 = r0.toString()
            java.lang.String r0 = "aweme/detail"
            boolean r0 = r1.contains(r0)
            if (r0 != 0) goto L_0x00c4
            java.lang.StringBuilder r0 = new java.lang.StringBuilder
            r0.<init>()
            r0.append(r11)
            r0.append(r12)
            java.lang.String r1 = r0.toString()
            java.lang.String r0 = "aweme/push_detail"
            boolean r0 = r1.contains(r0)
            if (r0 == 0) goto L_0x01bc
        L_0x00c4:
            r4.LJIIJJI = r5
        L_0x00c6:
            X.Ly6 r1 = r4.LIZ
            java.lang.String r0 = r8.LIZ(r10)
            r1.LIZJ(r0)
            boolean r14 = r4.LIZLLL
            r9 = r4
            r15 = r18
            android.content.Intent r3 = r8.LIZ(r9, r10, r11, r12, r13, r14, r15)
            if (r3 == 0) goto L_0x00fc
            java.lang.String r2 = "share_url_user_id"
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            if (r0 == 0) goto L_0x01a9
            X.Ly6 r1 = r4.LIZ
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            r1.LJFF(r0)
        L_0x00eb:
            java.lang.String r2 = "share_url_link_id"
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            if (r0 == 0) goto L_0x00fc
            X.Ly6 r1 = r4.LIZ
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            r1.LJI(r0)
        L_0x00fc:
            if (r3 != 0) goto L_0x010c
            boolean r0 = r4.LIZLLL
            r8.LIZ(r4, r10, r0)
            r2 = 2000(0x7d0, float:2.803E-42)
            android.net.Uri r1 = r4.LIZIZ
            java.lang.String r0 = "independent_transfer"
            X.C5327LyI.LIZ(r0, r2, r1)
        L_0x010c:
            java.lang.String r0 = r8.LIZ()
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x01a0
            if (r3 == 0) goto L_0x0123
            android.content.ComponentName r0 = r3.getComponent()
            java.lang.String r0 = r0.getClassName()
            X.LUR.LIZ(r10, r0)
        L_0x0123:
            r9 = 1
        L_0x0124:
            java.lang.String r7 = "gd_label"
            if (r3 == 0) goto L_0x016a
            boolean r0 = r4.LIZ()
            if (r0 != 0) goto L_0x016a
            java.lang.String r8 = "com.ss.android.ugc.aweme.intent.extra.EXTRA_AWEME_PUSH_TAB"
            boolean r0 = r3.hasExtra(r8)
            if (r0 != 0) goto L_0x016a
            java.lang.String r0 = "tab_index"
            java.lang.String r0 = r10.getQueryParameter(r0)
            java.lang.String r2 = X.C5360Lyp.LIZ((java.lang.String) r0)
            java.lang.String r0 = "aweme"
            boolean r0 = r0.equals(r11)
            if (r0 == 0) goto L_0x015c
            java.lang.String r1 = r10.getQueryParameter(r7)
            java.lang.String r0 = "click_push_newvideo"
            boolean r0 = r0.equals(r1)
            if (r0 == 0) goto L_0x015c
            java.lang.String r0 = "DISCOVER"
            boolean r0 = android.text.TextUtils.equals(r2, r0)
            if (r0 != 0) goto L_0x0165
        L_0x015c:
            boolean r0 = android.text.TextUtils.isEmpty(r2)
            if (r0 != 0) goto L_0x0165
            r3.putExtra(r8, r2)
        L_0x0165:
            java.lang.String r0 = "is_from_push"
            r3.putExtra(r0, r5)
        L_0x016a:
            if (r3 == 0) goto L_0x017b
            java.lang.String r2 = "backurl"
            java.lang.String r1 = r10.getQueryParameter(r2)
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 != 0) goto L_0x017b
            r3.putExtra(r2, r1)
        L_0x017b:
            X.9Zo r0 = X.9Zo.LIZ()
            r0.LIZ = r6
            X.Eu6.LIZ(r10, r3)
            if (r3 == 0) goto L_0x019d
            java.lang.String r0 = r10.getQueryParameter(r7)
            if (r0 == 0) goto L_0x019d
            java.lang.String r1 = r10.getQueryParameter(r7)
            java.lang.String r0 = "click_wap"
            boolean r0 = r1.startsWith(r0)
            if (r0 == 0) goto L_0x019d
            java.lang.String r0 = "ads_app_activity_by_wap_click"
            r3.putExtra(r0, r5)
        L_0x019d:
            if (r9 != 0) goto L_0x01ef
            goto L_0x01da
        L_0x01a0:
            java.lang.String r0 = r8.LIZ()
            X.LUR.LIZ(r10, r0)
            goto L_0x0123
        L_0x01a9:
            java.lang.String r2 = "share_sec_url_user_id"
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            if (r0 == 0) goto L_0x00eb
            X.Ly6 r1 = r4.LIZ
            java.lang.String r0 = LIZ((android.content.Intent) r3, (java.lang.String) r2)
            r1.LJFF(r0)
            goto L_0x00eb
        L_0x01bc:
            r4.LJIIJJI = r6
            goto L_0x00c6
        L_0x01c0:
            r9 = 0
            goto L_0x0124
        L_0x01c3:
            boolean r0 = r4.LIZLLL
            if (r0 == 0) goto L_0x01ce
            java.lang.String r0 = "push"
        L_0x01c9:
            r6.appendQueryParameter(r5, r0)
            goto L_0x0072
        L_0x01ce:
            java.lang.String r0 = "deeplink"
            goto L_0x01c9
        L_0x01d1:
            r13 = r2
            goto L_0x004c
        L_0x01d4:
            java.lang.String r12 = r7.getPath()
            goto L_0x003c
        L_0x01da:
            org.json.JSONObject r2 = new org.json.JSONObject     // Catch:{ Exception -> 0x01ef }
            r2.<init>()     // Catch:{ Exception -> 0x01ef }
            java.lang.String r1 = "open_url"
            java.lang.String r0 = r10.toString()     // Catch:{ Exception -> 0x01ef }
            r2.put(r1, r0)     // Catch:{ Exception -> 0x01ef }
            java.lang.String r1 = "service_monitor"
            java.lang.String r0 = "no_matched_deep_link"
            X.9bx.LIZ(r1, r0, r2)     // Catch:{ Exception -> 0x01ef }
        L_0x01ef:
            if (r9 != 0) goto L_0x01fc
            if (r19 == 0) goto L_0x01fc
            r4.LJFF = r5
            X.Ly6 r1 = r4.LIZ
            java.lang.String r0 = "default_homepage"
            r1.LIZJ(r0)
        L_0x01fc:
            return r3
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity.LIZ(android.net.Uri, boolean, boolean):android.content.Intent");
    }

    public final /* synthetic */ 2Pr LIZ(String str, String str2, Context context) {
        2UX r2 = new 2UX();
        r2.LIZ("rule_id", this.LJ);
        r2.LIZ("push_label", this.LJIJJ);
        r2.LIZ("anchor_id", str);
        r2.LIZ("room_id", str2);
        2nK.LIZ("2131831189", r2.LIZ);
        LIZJ();
        if (context instanceof Activity) {
            3jJ.LIZ(context).finish();
        }
        return 2Pr.LIZ;
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU, android.app.Activity] */
    public void onDestroy() {
        8gF.LJ(this);
        DeepLinkHandlerActivity.super.onDestroy();
        this.LJFF = false;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU, android.app.Activity] */
    public void onStart() {
        8gF.LIZ(this);
        DeepLinkHandlerActivity.super.onStart();
        finish();
    }

    /* JADX WARNING: type inference failed for: r6v0, types: [android.content.Context, com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, android.app.Activity] */
    private boolean LIZIZ() {
        String[] strArr;
        String LIZ2 = S9B.LIZ();
        try {
            strArr = (String[]) SettingsManager.LIZ().LIZ("app_action_allowlist", String[].class);
            if (strArr == null) {
                strArr = new String[]{"US"};
            }
        } catch (Throwable unused) {
            strArr = new String[]{"US"};
        }
        for (String equals : strArr) {
            if (TextUtils.equals(LIZ2, equals)) {
                return false;
            }
        }
        if (!LIZ()) {
            Intent mainActivityIntent = MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityIntent(this);
            mainActivityIntent.putExtra("app_action_restricted", true);
            LIZ((DeepLinkHandlerActivity) this, mainActivityIntent);
        } else {
            3af r1 = new 3af(this);
            r1.LJ(2131824991);
            3af.LIZ(r1);
        }
        return true;
    }

    private void LIZJ() {
        Intent intent = getIntent();
        this.LJIIL = intent.getStringArrayListExtra("pre_o_urls");
        try {
            if (LIZIZ(intent)) {
                if (!this.LJIIZILJ) {
                    LIZ(this.LJIILJJIL, this.LJIILL, this.LJIILIIL);
                }
                C5327LyI.LIZ("Transfer", 2000, this.LIZIZ);
                9Zo.LIZ().LIZ = false;
                this.LJIJI.LIZ(LIZ(this.LIZIZ, this.LJIIL), true, "");
                Tpf.LIZ.LIZ(this.LIZIZ, this.LIZLLL);
                if (this.LIZLLL && this.LJIIJJI) {
                    int isPushVideoPreload = 7tw.LIZ().isPushVideoPreload(this.LJII);
                    if (LIZ()) {
                        EuI.LIZIZ(System.currentTimeMillis(), this.LJIJJ, isPushVideoPreload);
                    } else {
                        EuI.LIZ(System.currentTimeMillis(), this.LJIJJ, isPushVideoPreload);
                    }
                }
            }
        } catch (Exception e) {
            this.LJIJI.LIZ(LIZ(this.LIZIZ, this.LJIIL), false, e.getMessage());
            Uri uri = this.LIZIZ;
            e.getMessage();
            C5327LyI.LIZ("Transfer", 2014, uri);
            0HH.LIZ(e);
        }
    }

    public void setTheme(int i) {
        try {
            DeepLinkHandlerActivity.super.setTheme(i);
        } catch (Exception unused) {
        }
    }

    public static void LIZ(AlertDialog alertDialog) {
        alertDialog.show();
        2fU.LIZ.LIZ(alertDialog);
    }

    /* JADX WARNING: type inference failed for: r12v0, types: [android.content.Context, com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity] */
    private boolean LIZIZ(Intent intent) {
        String str;
        Uri uri;
        String str2;
        boolean z;
        boolean z2;
        boolean z3;
        String str3 = "";
        if (intent != null) {
            str = LIZ(intent, "rule_id");
        } else {
            str = str3;
        }
        if (intent != null) {
            uri = intent.getData();
        } else {
            uri = null;
        }
        List allUidList = this.LJIJ.allUidList();
        String curUserId = this.LJIJ.getCurUserId();
        if (uri != null) {
            str2 = uri.getQueryParameter("multi_account_push_uid");
        } else {
            str2 = null;
        }
        boolean isEmpty = TextUtils.isEmpty(str2);
        boolean isLogin = 46i.LJFF().isLogin();
        boolean equals = TextUtils.equals(str2, curUserId);
        boolean contains = allUidList.contains(str2);
        if (S9B.LIZJ() && !isEmpty && isLogin && !equals) {
            this.LJIIZILJ = true;
            if (AVExternalServiceImpl.LIZ().publishService().isPublishing()) {
                new Handler().post(new C5364Lyt(this));
                C5327LyI.LIZ("Transfer", 2011, this.LIZIZ);
                return false;
            }
            LIZIZ(contains, intent);
        }
        if (intent == null || !intent.getBooleanExtra("second_jump", false)) {
            z = false;
        } else {
            z = true;
        }
        if (!878.LIZ(this.LJIIL)) {
            if (!46i.LJFF().isLogin() || TextUtils.isEmpty(str2) || TextUtils.equals(str2, this.LJIJ.getCurUserId())) {
                if (!LIZ() || z) {
                    Iterator<String> it = this.LJIIL.iterator();
                    while (it.hasNext()) {
                        Uri parse = Uri.parse(it.next());
                        if (this.LJIILL != null) {
                            z3 = true;
                        } else {
                            z3 = false;
                        }
                        Intent LIZ2 = LIZ(parse, z3, false);
                        if (LIZ2 != null) {
                            LIZ2.putExtra("is_have_intents", true);
                            LIZ2.putExtra("rule_id", str);
                            this.LJIILIIL.add(0, LIZ2);
                        }
                    }
                }
            } else if (LIZ()) {
                this.LJIJI.LIZ(this.LJIIL.toString(), false, "abs isAppHot == true");
                return false;
            } else {
                this.LJIILJJIL = MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityIntent(this);
            }
        }
        if (this.LJIILJJIL == null) {
            Uri uri2 = this.LIZIZ;
            if (this.LJIILL != null) {
                z2 = true;
            } else {
                z2 = false;
            }
            this.LJIILJJIL = LIZ(uri2, z2, true);
        }
        Intent intent2 = this.LJIILJJIL;
        if (intent2 == null) {
            if (!this.LJIILLIIL) {
                IDeepLinkService iDeepLinkService = this.LJIJI;
                Uri uri3 = this.LIZIZ;
                if (uri3 != null) {
                    str3 = uri3.toString();
                }
                iDeepLinkService.LIZ(str3, false, "abs intent == null");
            }
            if (!LIZ() && this.LJFF) {
                Intent mainActivityIntent = MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityIntent(this);
                this.LJIILJJIL = mainActivityIntent;
                070.LIZ(this, mainActivityIntent, (Bundle) null);
            }
            return false;
        }
        intent2.putExtra("from_notification", this.LIZLLL);
        this.LJIILJJIL.putExtra("from_notification_uuid", this.LJ);
        this.LJIILJJIL.putExtra("rule_id", str);
        if (!this.LIZJ) {
            this.LJIILJJIL.addFlags(268435456);
        }
        if (this.LJIILIIL.size() > 0) {
            if (this.LJIILJJIL.getComponent() == null || (!TextUtils.equals(MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityClass().getName(), this.LJIILJJIL.getComponent().getClassName()) && !TextUtils.equals(MainServiceImpl.createIMainServicebyMonsterPlugin(false).getSplashActivityClass().getName(), this.LJIILJJIL.getComponent().getClassName()))) {
                this.LJIILJJIL.putExtra("is_have_intents", true);
                this.LJIILIIL.add(this.LJIILJJIL);
            } else {
                this.LJIILIIL.clear();
            }
        }
        return true;
    }

    private boolean LIZ(Intent intent) {
        if (intent == null) {
            return false;
        }
        String action = intent.getAction();
        if (!86a.LIZ(action) && action.indexOf("com.ss.android.sdk.") == 0) {
            String LIZ2 = LIZ(intent, "open_url");
            if (!86a.LIZ(LIZ2)) {
                try {
                    this.LIZIZ = Uri.parse(LIZ2);
                } catch (Exception unused) {
                    return false;
                }
            }
        }
        if (this.LIZIZ == null) {
            this.LIZIZ = intent.getData();
        }
        Uri uri = this.LIZIZ;
        if (uri == null || uri.isOpaque()) {
            return false;
        }
        return true;
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.1oX, X.SNU, android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* JADX WARNING: Removed duplicated region for block: B:107:0x0333  */
    /* JADX WARNING: Removed duplicated region for block: B:110:0x0344  */
    /* JADX WARNING: Removed duplicated region for block: B:113:0x0351  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onCreate(android.os.Bundle r17) {
        /*
            r16 = this;
            r2 = r16
            r6 = r2
            r5 = r17
            X.8gF.LIZ(r2, r5)
            java.lang.String r4 = "com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity"
            java.lang.String r3 = "onCreate"
            r12 = 1
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r12)
            com.bytedance.ies.abmock.SettingsManager r1 = com.bytedance.ies.abmock.SettingsManager.LIZ()
            java.lang.String r0 = "fix_bad_parcel"
            r11 = 0
            boolean r0 = r1.LIZ(r0, r11)
            if (r0 == 0) goto L_0x0036
            int r1 = android.os.Build.VERSION.SDK_INT
            r0 = 29
            if (r1 != r0) goto L_0x0036
            if (r5 == 0) goto L_0x0036
            java.lang.ClassLoader r1 = r5.getClassLoader()
            java.lang.ClassLoader r0 = r2.getClassLoader()
            if (r1 == r0) goto L_0x0036
            java.lang.ClassLoader r0 = r2.getClassLoader()
            r5.setClassLoader(r0)
        L_0x0036:
            X.LsC r0 = X.C5383LzC.LIZ
            r6.activityConfiguration(r0)
            com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity.super.onCreate(r5)
            android.content.Intent r5 = r2.getIntent()
            java.lang.String r0 = "old"
            X.C5327LyI.LIZ(r5, r0)
            X.C5327LyI.LIZ((android.content.Intent) r5)
            X.SfZ r0 = X.SfZ.LJIJ
            r0.LIZ(r6)
            X.46U r0 = X.46U.LIZ
            boolean r0 = r0.LIZ(r6)
            if (r0 == 0) goto L_0x0066
            r2 = 2006(0x7d6, float:2.811E-42)
            android.net.Uri r1 = r5.getData()
            java.lang.String r0 = "journey"
            X.C5327LyI.LIZ(r0, r2, r1)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r11)
            return
        L_0x0066:
            X.LyV r1 = X.C5340LyV.LIZ
            java.lang.String r0 = "from_deep_link"
            boolean r0 = r1.LIZ((android.app.Activity) r6, (java.lang.String) r0, (boolean) r11)
            if (r0 == 0) goto L_0x007f
            r2 = 2005(0x7d5, float:2.81E-42)
            android.net.Uri r1 = r5.getData()
            java.lang.String r0 = "login"
            X.C5327LyI.LIZ(r0, r2, r1)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r11)
            return
        L_0x007f:
            android.content.Intent r7 = r2.getIntent()
            boolean r0 = r6.LIZ((android.content.Intent) r7)
            java.lang.String r8 = ""
            java.lang.String r9 = "uri_parse"
            if (r0 != 0) goto L_0x00af
            boolean r0 = r2.isFinishing()
            if (r0 != 0) goto L_0x0096
            r2.finish()
        L_0x0096:
            java.lang.String r0 = "from_tile_service"
            boolean r0 = r7.getBooleanExtra(r0, r11)
            if (r0 != 0) goto L_0x00a5
            com.ss.android.ugc.aweme.deeplink.IDeepLinkService r1 = r6.LJIJI
            java.lang.String r0 = "abs uri==null"
            r1.LIZ((java.lang.String) r8, (boolean) r11, (java.lang.String) r0)
        L_0x00a5:
            r1 = 2001(0x7d1, float:2.804E-42)
            r0 = 0
            X.C5327LyI.LIZ(r9, r1, r0)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r11)
            return
        L_0x00af:
            java.lang.String r0 = "clear_all_notifications"
            boolean r0 = r7.getBooleanExtra(r0, r11)
            if (r0 == 0) goto L_0x00be
            com.ss.android.ugc.awemepushapi.IPushApi r0 = X.7tw.LIZ()
            r0.clearAll(r6)
        L_0x00be:
            android.net.Uri r10 = r7.getData()
            if (r10 == 0) goto L_0x00e1
            java.lang.String r0 = "is_zlink"
            r7.getBooleanExtra(r0, r11)
            java.lang.String r0 = "push_challenge_ticket"
            java.lang.String r1 = r10.getQueryParameter(r0)
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 != 0) goto L_0x00e1
            X.46i.LIZ()
            com.ss.android.ugc.aweme.IAccountService r0 = X.46i.LIZ
            X.4S5 r0 = r0.LJIILIIL()
            r0.onOpenPushChallengePage(r1)
        L_0x00e1:
            java.lang.String r5 = "dl_from"
            java.lang.String r1 = LIZ((android.content.Intent) r7, (java.lang.String) r5)
            java.lang.String r0 = "af"
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            r6.LJIIIIZZ = r0
            java.lang.String r1 = LIZ((android.content.Intent) r7, (java.lang.String) r5)
            java.lang.String r0 = "facebook"
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            r6.LJIIIZ = r0
            X.Lyq r1 = X.C5361Lyq.LIZ
            boolean r0 = r6.LJIIIZ
            if (r0 != 0) goto L_0x0105
            boolean r0 = r6.LJIIIIZZ
            if (r0 == 0) goto L_0x0193
        L_0x0105:
            r0 = 1
        L_0x0106:
            r1.LIZ((boolean) r0)
            java.lang.String r0 = "is_from_self"
            boolean r0 = X.7xS.LIZIZ(r7, r0)
            r6.LIZJ = r0
            java.lang.String r0 = "from_notification"
            boolean r0 = X.7xS.LIZIZ(r7, r0)
            r6.LIZLLL = r0
            java.lang.String r0 = "from_notification_uuid"
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r0)
            r6.LJ = r0
            r0 = 0
            java.lang.String r5 = "msg_id"
            long r0 = r7.getLongExtra(r5, r0)
            r6.LJII = r0
            boolean r0 = r6.LIZLLL
            X.LSI.LIZIZ = r0
            X.Ly5 r5 = new X.Ly5
            r5.<init>(r6, r7)
            boolean r1 = r6.LIZLLL
            android.net.Uri r0 = r6.LIZIZ
            r5.LIZ((boolean) r1, (android.net.Uri) r0)
            X.LyL r1 = new X.LyL
            X.Ly6 r0 = r6.LIZ
            r1.<init>(r0)
            boolean r0 = r6.LIZLLL
            if (r0 != 0) goto L_0x014d
            android.net.Uri r0 = r6.LIZIZ
            r1.LIZ(r6, r0)
            r6.LIZIZ = r0
        L_0x014d:
            if (r10 == 0) goto L_0x015d
            java.lang.String r1 = "gd_label"
            java.lang.String r0 = r10.getQueryParameter(r1)
            if (r0 == 0) goto L_0x015d
            java.lang.String r0 = r10.getQueryParameter(r1)
            r6.LJIJJ = r0
        L_0x015d:
            java.lang.String r0 = X.C5331LyM.LIZ
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x017a
            boolean r0 = r6.LJIIIIZZ
            X.C5331LyM.LIZIZ = r0
            boolean r0 = r6.LIZLLL
            X.C5331LyM.LIZJ = r0
            X.LyM r1 = X.C5331LyM.LJIIIZ
            android.net.Uri r0 = r6.LIZIZ
            java.lang.String r0 = r0.toString()
            r1.LIZ(r0)
            X.C5331LyM.LIZLLL = r7
        L_0x017a:
            java.lang.String r0 = r6.LJIJJ
            java.lang.String r1 = "google_assistant"
            boolean r0 = android.text.TextUtils.equals(r0, r1)
            if (r0 == 0) goto L_0x0196
            boolean r0 = r2.LIZIZ()
            if (r0 == 0) goto L_0x0196
            r0 = 2007(0x7d7, float:2.812E-42)
            X.C5327LyI.LIZ(r9, r0, r10)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r11)
            return
        L_0x0193:
            r0 = 0
            goto L_0x0106
        L_0x0196:
            boolean r0 = X.ESC.LIZLLL()
            java.lang.String r13 = "amazon_alexa"
            if (r0 == 0) goto L_0x01da
            boolean r0 = r2.LIZ()
            if (r0 != 0) goto L_0x01af
            com.ss.android.ugc.aweme.services.IMainService r0 = com.ss.android.ugc.aweme.services.MainServiceImpl.createIMainServicebyMonsterPlugin(r11)
            android.content.Intent r0 = r0.getMainActivityIntent(r6)
            LIZ((com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity) r6, (android.content.Intent) r0)
        L_0x01af:
            java.lang.String r0 = r6.LJIJJ
            boolean r0 = android.text.TextUtils.equals(r13, r0)
            if (r0 != 0) goto L_0x01bf
            java.lang.String r0 = r6.LJIJJ
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            if (r0 == 0) goto L_0x01d0
        L_0x01bf:
            X.3af r1 = new X.3af
            r1.<init>(r6)
            r0 = 2131823693(0x7f110c4d, float:1.9280193E38)
            r1.LJ(r0)
            r1.LIZ()
            X.3af.LIZ(r1)
        L_0x01d0:
            r1 = 0
            r0 = 2008(0x7d8, float:2.814E-42)
            X.C5327LyI.LIZ(r9, r0, r10)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r1)
            return
        L_0x01da:
            com.ss.android.ugc.aweme.IAccountUserService r0 = X.46i.LJFF()
            boolean r0 = r0.isLogin()
            if (r0 != 0) goto L_0x0225
            java.lang.String r0 = r6.LJIJJ
            boolean r0 = android.text.TextUtils.equals(r13, r0)
            if (r0 != 0) goto L_0x01f4
            java.lang.String r0 = r6.LJIJJ
            boolean r0 = android.text.TextUtils.equals(r1, r0)
            if (r0 == 0) goto L_0x0225
        L_0x01f4:
            boolean r0 = r2.LIZ()
            if (r0 != 0) goto L_0x020b
            com.ss.android.ugc.aweme.services.IMainService r0 = com.ss.android.ugc.aweme.services.MainServiceImpl.createIMainServicebyMonsterPlugin(r11)
            android.content.Intent r1 = r0.getMainActivityIntent(r6)
            java.lang.String r0 = "unlogin_deeplink_third_part"
            r1.putExtra(r0, r12)
            LIZ((com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity) r6, (android.content.Intent) r1)
            goto L_0x01d0
        L_0x020b:
            X.3af r5 = new X.3af
            r5.<init>(r6)
            android.content.res.Resources r1 = r2.getResources()
            r0 = 2131823692(0x7f110c4c, float:1.928019E38)
            java.lang.String r0 = r1.getString(r0)
            r5.LIZ(r0)
            r5.LIZ()
            X.3af.LIZ(r5)
            goto L_0x01d0
        L_0x0225:
            if (r10 == 0) goto L_0x024a
            java.lang.String r1 = "min_app_version"
            java.lang.String r0 = r10.getQueryParameter(r1)
            if (r0 == 0) goto L_0x024a
            X.3PZ r12 = X.3PZ.LIZ()
            java.lang.String r1 = r10.getQueryParameter(r1)
            java.lang.String r0 = r10.toString()
            boolean r0 = r12.LIZ(r6, r1, r0)
            if (r0 == 0) goto L_0x024a
            r0 = 2009(0x7d9, float:2.815E-42)
            X.C5327LyI.LIZ(r9, r0, r10)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r11)
            return
        L_0x024a:
            java.lang.String r12 = "need_clear_notification_push_id"
            r11 = -1
            int r0 = r7.getIntExtra(r12, r11)
            if (r0 == r11) goto L_0x0264
            com.ss.android.ugc.awemepushapi.IPushApi r9 = X.7tw.LIZ()
            java.lang.String r0 = "cancel_TAG"
            java.lang.String r1 = LIZ((android.content.Intent) r7, (java.lang.String) r0)
            int r0 = r7.getIntExtra(r12, r11)
            r9.clearNotificationId(r1, r6, r0)
        L_0x0264:
            boolean r0 = X.Js6.LIZ
            if (r0 == 0) goto L_0x0396
            com.ss.android.ugc.aweme.live.ILiveOuterService r0 = com.ss.android.ugc.aweme.live.LiveOuterService.LJJI()
            X.3P1 r0 = r0.LJ()
            android.content.Context r15 = r0.LJJIII()
            if (r15 == 0) goto L_0x0391
            boolean r0 = r6.LIZLLL
            if (r0 == 0) goto L_0x0391
            com.ss.android.ugc.aweme.live.ILiveOuterService r0 = com.ss.android.ugc.aweme.live.LiveOuterService.LJJI()
            X.3P1 r0 = r0.LJ()
            java.util.Map r0 = r0.LJJIIJ()
            java.lang.String r13 = "room_id"
            java.lang.String r12 = "anchor_id"
            if (r0 == 0) goto L_0x038d
            java.lang.Object r11 = r0.get(r12)
            java.lang.String r11 = (java.lang.String) r11
            java.lang.Object r9 = r0.get(r13)
            java.lang.String r9 = (java.lang.String) r9
        L_0x0298:
            X.4EW r14 = new X.4EW
            r14.<init>(r15)
            r0 = 2131831191(0x7f112997, float:1.92954E38)
            r14.LIZJ(r0)
            r0 = 2131831190(0x7f112996, float:1.9295399E38)
            r14.LIZLLL(r0)
            X.4EJ r2 = new X.4EJ
            r2.<init>(r15)
            r1 = 2131831189(0x7f112995, float:1.9295397E38)
            X.Lyy r0 = new X.Lyy
            r0.<init>(r6, r11, r9, r15)
            r2.LIZ(r1, r0)
            r1 = 2131831188(0x7f112994, float:1.9295395E38)
            X.Lyz r0 = new X.Lyz
            r0.<init>(r6, r11, r9)
            r2.LIZIZ(r1, r0)
            r14.LIZ(r2)
            X.4EV r0 = r14.LIZ()
            android.app.Dialog r0 = r0.LIZJ()
            X.4FQ.LIZ(r0)
            X.2UX r2 = new X.2UX
            r2.<init>()
            java.lang.String r1 = r6.LJ
            java.lang.String r0 = "rule_id"
            r2.LIZ(r0, r1)
            java.lang.String r1 = r6.LJIJJ
            java.lang.String r0 = "push_label"
            r2.LIZ(r0, r1)
            r2.LIZ(r12, r11)
            r2.LIZ(r13, r9)
            java.util.Map r1 = r2.LIZ
            java.lang.String r0 = "end_live_ask_popup_show"
            X.2nK.LIZ(r0, r1)
        L_0x02f2:
            r1 = 0
            X.7sQ.LIZ = r1
            X.7im r0 = X.2HX.LIZ
            r0.LIZ = r1
            X.7im r0 = X.2HX.LIZ
            r0.LJ = r1
            boolean r0 = X.S9B.LIZJ()
            if (r0 == 0) goto L_0x0305
            X.C5390LzJ.LIZ = r1
        L_0x0305:
            android.net.Uri r0 = r6.LIZIZ
            r5.LIZ(r0)
            android.net.Uri r1 = r6.LIZIZ
            boolean r0 = r6.LIZLLL
            r5.LIZ((android.net.Uri) r1, (boolean) r0)
            com.ss.android.ugc.aweme.framework.services.ServiceManager r1 = com.ss.android.ugc.aweme.framework.services.ServiceManager.get()
            java.lang.Class<X.Ch3> r0 = X.Ch3.class
            r1.getService(r0)
            java.lang.String r9 = "user_id"
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r9)
            if (r0 == 0) goto L_0x0369
            X.Ly6 r2 = r6.LIZ
            java.lang.String r8 = LIZ((android.content.Intent) r7, (java.lang.String) r9)
        L_0x0328:
            r2.LJ(r8)
        L_0x032b:
            java.lang.String r2 = "launch_method"
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r2)
            if (r0 == 0) goto L_0x033c
            X.Ly6 r1 = r6.LIZ
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r2)
            r1.LIZ(r0)
        L_0x033c:
            java.lang.String r2 = "page_source"
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r2)
            if (r0 == 0) goto L_0x034d
            X.Ly6 r1 = r6.LIZ
            java.lang.String r0 = LIZ((android.content.Intent) r7, (java.lang.String) r2)
            r1.LIZIZ(r0)
        L_0x034d:
            boolean r0 = r6.LJI
            if (r0 != 0) goto L_0x035a
            android.net.Uri r2 = r6.LIZIZ
            X.Ly6 r1 = r6.LIZ
            boolean r0 = r6.LIZLLL
            r5.LIZ(r2, r1, r0)
        L_0x035a:
            android.net.Uri r0 = r6.LIZIZ
            r5.LIZIZ(r0)
            X.Lyq r1 = X.C5361Lyq.LIZ
            r0 = 0
            r1.LIZ((boolean) r0)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r4, r3, r0)
            return
        L_0x0369:
            if (r10 == 0) goto L_0x032b
            java.lang.String r1 = "params_url"
            java.lang.String r0 = r10.getQueryParameter(r1)
            if (r0 == 0) goto L_0x032b
            X.Ly6 r2 = r6.LIZ
            java.lang.String r0 = r10.getQueryParameter(r1)
            java.lang.String r0 = java.net.URLDecoder.decode(r0)
            android.net.Uri r1 = android.net.Uri.parse(r0)
            java.lang.String r0 = r1.getQueryParameter(r9)
            if (r0 != 0) goto L_0x0388
            goto L_0x0328
        L_0x0388:
            java.lang.String r8 = r1.getQueryParameter(r9)
            goto L_0x0328
        L_0x038d:
            r9 = r8
            r11 = r9
            goto L_0x0298
        L_0x0391:
            r2.LIZJ()
            goto L_0x02f2
        L_0x0396:
            r2.LIZJ()
            goto L_0x02f2
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity.onCreate(android.os.Bundle):void");
    }

    public static String LIZ(Intent intent, String str) {
        try {
            return intent.getStringExtra(str);
        } catch (Exception unused) {
            return null;
        }
    }

    private String LIZ(Uri uri, ArrayList<String> arrayList) {
        if (uri != null) {
            return uri.toString();
        }
        if (!878.LIZ(arrayList)) {
            return arrayList.toString();
        }
        return "";
    }

    public static void LIZ(DeepLinkHandlerActivity deepLinkHandlerActivity, Intent intent) {
        3i8.LIZ(intent, deepLinkHandlerActivity);
        deepLinkHandlerActivity.startActivity(intent);
    }

    private void LIZIZ(boolean z, Intent intent) {
        Activity previousActivity = ActivityStack.getPreviousActivity();
        if (previousActivity != null) {
            String canonicalName = previousActivity.getClass().getCanonicalName();
            ArrayList arrayList = new ArrayList();
            arrayList.add("com.ss.android.ugc.aweme.shortvideo.ui.VideoRecordNewActivity");
            arrayList.add("com.ss.android.ugc.aweme.shortvideo.edit.VEVideoPublishEditActivity");
            arrayList.add("com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity");
            if (arrayList.contains(canonicalName)) {
                AlertDialog.Builder builder = new AlertDialog.Builder(previousActivity, 2131886910);
                builder.setMessage(2131831209);
                builder.setNegativeButton(2131822315, C5387LzG.LIZ);
                builder.setPositiveButton(2131823145, new C5368Lyx(this, z, intent));
                AlertDialog create = builder.create();
                create.setCanceledOnTouchOutside(false);
                create.setCancelable(false);
                try {
                    LIZ(create);
                } catch (Exception e) {
                    0HH.LIZ(e);
                }
                arrayList.clear();
                return;
            }
            arrayList.clear();
        }
        LIZ(z, intent);
    }

    /* JADX WARNING: type inference failed for: r8v0, types: [android.content.Context, com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity] */
    /* access modifiers changed from: private */
    /* renamed from: LIZJ */
    public void LIZ(boolean z, Intent intent) {
        Uri uri;
        String str;
        if (intent != null) {
            uri = intent.getData();
        } else {
            uri = null;
        }
        if (uri != null) {
            str = uri.getQueryParameter("multi_account_push_uid");
        } else {
            str = null;
        }
        Bundle bundle = new Bundle();
        bundle.putParcelable("push_intent", intent);
        bundle.putBoolean("mFromNotification", this.LIZLLL);
        bundle.putString("from_notification_uuid", this.LJ);
        bundle.putBoolean("cancelRestoreOnMain", true);
        if (z) {
            bundle.putBoolean("switch_jump", true);
            LIZ(str, bundle);
            return;
        }
        Intent intent2 = new Intent(3wF.LIZ, AccountService.LIZ().LJII().getPushLoginActivityClass());
        intent2.putExtra("multi_account_push_uid", str);
        intent2.putExtra("multi_account", bundle);
        if (LIZ()) {
            LIZ((DeepLinkHandlerActivity) this, intent2);
            return;
        }
        startActivities(new Intent[]{MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityIntent(this), intent2}, (Bundle) null);
    }

    private void LIZ(String str, Bundle bundle) {
        Ryr findSignificanUserInfo = 46i.LJFF().findSignificanUserInfo(str);
        if (findSignificanUserInfo != null) {
            46i.LIZIZ().switchAccount(findSignificanUserInfo, bundle, new 1(this, bundle));
        }
    }

    public final /* synthetic */ 2Pr LIZ(String str, String str2) {
        2UX r2 = new 2UX();
        r2.LIZ("rule_id", this.LJ);
        r2.LIZ("push_label", this.LJIJJ);
        r2.LIZ("anchor_id", str);
        r2.LIZ("room_id", str2);
        2nK.LIZ("2131831188", r2.LIZ);
        C5327LyI.LIZ("live_dialog", 2010, this.LIZIZ);
        return 2Pr.LIZ;
    }

    public static void LIZ(DeepLinkHandlerActivity deepLinkHandlerActivity, Intent intent, Bundle bundle) {
        3i8.LIZ(intent, deepLinkHandlerActivity);
        deepLinkHandlerActivity.startActivity(intent, bundle);
    }

    /* JADX WARNING: type inference failed for: r7v0, types: [android.content.Context, com.ss.android.ugc.aweme.deeplink.DeepLinkHandlerActivity, X.SNU] */
    private void LIZ(Intent intent, Intent intent2, ArrayList<Intent> arrayList) {
        String str;
        069 LIZ2;
        if (getIntent() != null) {
            str = LIZ(getIntent(), "rule_id");
        } else {
            str = "";
        }
        boolean equals = TextUtils.equals(intent.getComponent().getClassName(), DetailFeedServiceImpl.LIZIZ().LIZ().getName());
        this.LJIIJ = equals;
        Bundle bundle = null;
        if (equals && (LIZ2 = 069.LIZ(this)) != null) {
            bundle = LIZ2.LIZ();
        }
        if (intent2 != null) {
            if (arrayList.size() > 1) {
                intent2.putExtra("next_steps", arrayList);
            } else {
                intent2.putExtra("next_step", intent);
            }
            intent2.putExtra("rule_id", str);
            if (LIZ()) {
                LIZ((DeepLinkHandlerActivity) this, intent2, bundle);
                return;
            }
            Intent[] intentArr = new Intent[2];
            intentArr[0] = MainServiceImpl.createIMainServicebyMonsterPlugin(false).getMainActivityIntent(this);
            intentArr[0].putExtra("rule_id", str);
            intentArr[1] = intent2;
            startActivities(intentArr, bundle);
        } else if (arrayList.size() > 1) {
            startActivities((Intent[]) arrayList.toArray(new Intent[arrayList.size()]), bundle);
        } else if (intent.getBooleanExtra("need_post", false)) {
            new Handler().post(new C5367Lyw(this, intent, bundle));
        } else {
            070.LIZ(this, intent, bundle);
        }
    }
}
