package com.ss.android.ugc.aweme.shortvideo.ui;

import X.0AA;
import X.0AP;
import X.0Bs;
import X.0Bv;
import X.0Bx;
import X.0By;
import X.0CM;
import X.0Gf;
import X.0Gp;
import X.1hK;
import X.2GD;
import X.2HN;
import X.2Pr;
import X.2nK;
import X.36a;
import X.3BB;
import X.4r1;
import X.7b4;
import X.8gF;
import X.AnonymousClass54Y;
import X.AnonymousClass54Z;
import X.AnonymousClass56Y;
import X.AnonymousClass59B;
import X.AnonymousClass655;
import X.AnonymousClass6J4;
import X.AnonymousClass73G;
import X.C07755Qv;
import X.C30456Gd;
import X.C31176Ix;
import X.C35526Zq;
import X.C38386eS;
import X.C39736gd;
import X.C39956gz;
import X.C39976h1;
import X.C41576jb;
import X.C41996kH;
import X.C42016kJ;
import X.C42786lY;
import X.C42986ls;
import X.C43016lv;
import X.C43056lz;
import X.C43066m0;
import X.C43096m3;
import X.C43116m5;
import X.C43126m6;
import X.C43136m7;
import X.C43146m8;
import X.C43186mC;
import X.C43296mN;
import X.C43306mO;
import X.C43326mQ;
import X.C43376mV;
import X.C43496mh;
import X.C44156nl;
import X.C539678o;
import X.CqM;
import X.Cwu;
import X.DVG;
import X.FR4;
import X.FSD;
import X.FUR;
import X.FWb;
import X.Fnq;
import X.Fnr;
import X.JMk;
import X.Ltg;
import X.M12;
import X.MW9;
import X.NPk;
import X.NYc;
import X.NeJ;
import X.Nte;
import X.O3w;
import X.Oie;
import X.RSB;
import X.SxS;
import X.Szo;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.abmock.SettingsManager;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.adaptation.analysis.Analysis;
import com.ss.android.ugc.aweme.api.AnchorAutoSelectionService;
import com.ss.android.ugc.aweme.commerce.tools.tcm.CommerceToolsTcmModel;
import com.ss.android.ugc.aweme.common.MobClick;
import com.ss.android.ugc.aweme.creative.CreativeInfo;
import com.ss.android.ugc.aweme.creative.model.publish.AVTextExtraStruct;
import com.ss.android.ugc.aweme.infosticker.StickerChallenge;
import com.ss.android.ugc.aweme.shortvideo.AVChallenge;
import com.ss.android.ugc.aweme.shortvideo.edit.CompileProbeResult;
import com.ss.android.ugc.aweme.shortvideo.edit.VEVideoPublishEditActivity;
import com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel;
import com.ss.android.ugc.aweme.shortvideo.edit.model.EditPreviewInfo;
import com.ss.android.ugc.aweme.shortvideo.edit.videolength.VideoLengthChecker;
import com.ss.android.ugc.aweme.shortvideo.image.ExpandTextViewModel;
import com.ss.android.ugc.aweme.shortvideo.image.ExpandedTitleModule;
import com.ss.android.ugc.aweme.shortvideo.model.AutoSelectedAnchorInfos;
import com.ss.android.ugc.aweme.shortvideo.ui.viewmodel.VideoPublishViewModel;
import com.ss.android.ugc.aweme.sticker.data.DuetStickerStruct;
import com.ss.android.ugc.aweme.sticker.data.DuetStickerUserStruct;
import com.ss.android.vesdk.runtime.VEMem;
import java.util.HashMap;
import java.util.List;

public class VideoPublishActivity extends Ltg implements C43326mQ, Nte {
    public TextView LIZLLL;
    public TextView LJ;
    public VideoPublishFragment LJFF;
    public VideoPublishEditModel LJI;
    public long LJII;
    public TextView LJIIIIZZ;
    public ExpandTextViewModel LJIIIZ;
    public boolean LJIIJ;
    public int LJIIJJI;
    public boolean LJIIL;
    public boolean LJIILIIL;
    public boolean LJIILJJIL;
    public boolean LJIILL;

    static {
        Covode.recordClassIndex(112837);
    }

    public final String cy_() {
        return "video_post_page";
    }

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

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

    public final boolean cx_() {
        return this.LJIIL;
    }

    public final VideoPublishViewModel LJII() {
        return DVG.LIZ(this).LIZ(VideoPublishViewModel.class);
    }

    private boolean LJIIIZ() {
        if (getIntent().getIntExtra("fromDraft", 0) == 0 || this.LJI.isFromRestoreRecover) {
            return false;
        }
        return true;
    }

    public final void LIZIZ() {
        if (this.LJFF.LJJIIJ != null) {
            this.LJFF.LJJIIJ.LIZIZ().LIZIZ();
        }
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void finish() {
        int i;
        this.LJIIL = false;
        VideoPublishActivity.super.finish();
        if (Fnr.LIZ()) {
            i = Fnq.LIZ();
        } else {
            i = 9;
        }
        Fnq.LIZIZ(this, i);
    }

    private void LJIIJJI() {
        C43096m3.LIZ(this, new C43126m6(this));
        C43096m3.LIZIZ(this, new C43136m7(this));
        ExpandTextViewModel LIZ = LIZ((1hK) this).LIZ(ExpandTextViewModel.class);
        this.LJIIIZ = LIZ;
        LIZ.LIZ.observe(this, new 0CM<Integer>() {
            static {
                Covode.recordClassIndex(112840);
            }

            public final /* synthetic */ void onChanged(Object obj) {
                VideoPublishActivity.this.LJ.setText(((Integer) obj).intValue());
            }
        });
        this.LJIIIZ.LIZIZ.observe(this, new 0CM<Boolean>() {
            static {
                Covode.recordClassIndex(112841);
            }

            public final /* synthetic */ void onChanged(Object obj) {
                float f;
                Boolean bool = (Boolean) obj;
                TextView textView = VideoPublishActivity.this.LIZLLL;
                if (bool.booleanValue()) {
                    f = 1.0f;
                } else {
                    f = 0.0f;
                }
                textView.setAlpha(f);
                VideoPublishActivity.this.LIZLLL.setEnabled(bool.booleanValue());
            }
        });
    }

    public final Analysis LJFF() {
        if (VideoPublishActivity.super.LJFF() == null) {
            return VideoPublishActivity.super.LJFF();
        }
        HashMap hashMap = new HashMap();
        hashMap.put("creation_id", this.LJI.getCreationId());
        hashMap.put("is_story_shoot", "0");
        Analysis LJFF2 = VideoPublishActivity.super.LJFF();
        LJFF2.setExtraMap(hashMap);
        return LJFF2;
    }

    public final AnonymousClass6J4 LJI() {
        AnonymousClass6J4 r2 = new AnonymousClass6J4();
        r2.LIZ("enter_from", "video_post_page");
        r2.LIZ("creation_id", this.LJI.getCreationId());
        if (!TextUtils.isEmpty(this.LJI.newDraftId)) {
            r2.LIZ("new_draft_id", this.LJI.newDraftId);
        }
        return r2;
    }

    public void onBackPressed() {
        this.LJII = System.currentTimeMillis();
        if (getSupportFragmentManager().LJ() > 0) {
            getSupportFragmentManager().LIZJ();
            return;
        }
        LJII().LIZ(LJIIIZ(), this.LJI.mIsFromDraft);
        C35526Zq.LIZ("VideoPublishActivity", "system back event");
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [android.content.Context, X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void onDestroy() {
        8gF.LJ(this);
        this.LJIIL = false;
        VideoPublishActivity.super.onDestroy();
        AnonymousClass56Y.LIZ.leave(this, "video_publish");
        C539678o.LJ.LIZ((Context) this);
        NeJ.LIZ("normal").LIZ("at_post_page");
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [android.content.Context, X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void onPause() {
        8gF.LIZJ(this);
        VideoPublishActivity.super.onPause();
        VideoPublishEditModel videoPublishEditModel = this.LJI;
        if (videoPublishEditModel != null) {
            if (C07755Qv.LIZ(videoPublishEditModel)) {
                AnonymousClass59B.LJFF.LIZLLL();
            }
            AnonymousClass56Y.LIZ.pause(this, "video_publish", this.LJI.getCreationId(), this.LJI.mShootWay);
        }
        MW9.LIZ("tool_publish_enter");
        RSB.LJIILIIL.LIZ().LIZIZ("tool_publish");
        VEMem.getInstance().uploadVirtualMemSize(5);
    }

    private void LJIIL() {
        long currentTimeMillis;
        long longExtra = getIntent().getLongExtra("draft_to_edit_start_time", -1);
        if (longExtra == -1) {
            currentTimeMillis = -1;
        } else {
            currentTimeMillis = System.currentTimeMillis() - longExtra;
        }
        long longExtra2 = getIntent().getLongExtra("draft_modify_time", -1);
        long longExtra3 = getIntent().getLongExtra("draft_file_size", -1);
        int i = 1;
        EditPreviewInfo previewInfo = this.LJI.getPreviewInfo();
        if (previewInfo != null) {
            i = previewInfo.getVideoList().size();
        }
        C42786lY r6 = C42786lY.LIZ;
        AnonymousClass6J4 r8 = new AnonymousClass6J4();
        r8.LIZ("duration", currentTimeMillis);
        r8.LIZ("video_size", longExtra3);
        r8.LIZ("video_count", i);
        r8.LIZ("music_id", this.LJI.musicId);
        r8.LIZ("modify_time", longExtra2);
        r6.LIZ("tool_performance_draft_to_publish", r8.LIZ);
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [android.content.Context, X.1hK, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity] */
    public final void LJIIIIZZ() {
        VideoPublishFragment LIZ = getSupportFragmentManager().LIZ(2131365158);
        if (LIZ != null) {
            LIZ.LIZJ("enter_video_edit_page");
            if (LIZ.isAdded()) {
                LIZ.LIZ(false);
            }
            LIZ.LJII();
            VideoPublishEditModel videoPublishEditModel = LIZ.LJJIIZ;
            Intent LIZ2 = C41996kH.LIZ.LIZ(videoPublishEditModel, this.LJIIJJI, false);
            LIZ2.putExtra("NLE", videoPublishEditModel.nleData);
            if (C30456Gd.LJIILL(videoPublishEditModel)) {
                NYc.LIZ().LIZLLL((Context) this, LIZ2);
                return;
            }
            LIZ2.setClass(this, VEVideoPublishEditActivity.class);
            C539678o.LJ.LIZ((Context) this, LIZ2);
        }
    }

    /* JADX WARNING: type inference failed for: r8v0, types: [X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void onStop() {
        8gF.LIZLLL(this);
        VideoPublishActivity.super.onStop();
        if (this.LJII != -1) {
            long currentTimeMillis = System.currentTimeMillis() - this.LJII;
            if (currentTimeMillis < 10000) {
                C43016lv.LIZ.LIZ("click_back_in_publish", currentTimeMillis);
            }
            this.LJII = -1;
        }
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }

    public final void LIZ() {
        if (this.LJFF.LJJIIJ != null) {
            this.LJFF.LJJIIJ.LIZIZ().LIZ();
        }
    }

    /* JADX WARNING: type inference failed for: r10v0, types: [X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void onResume() {
        VideoPublishEditModel videoPublishEditModel;
        String str;
        8gF.LIZIZ(this);
        int i = 1;
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity", "onResume", true);
        VideoPublishActivity.super.onResume();
        RSB.LJIILIIL.LIZ().LIZ("tool_publish");
        VEMem.getInstance().uploadVirtualMemSize(4);
        AnonymousClass56Y.LIZ.end("av_video_publish", "first_frame");
        if (!(this.LJIILL || (videoPublishEditModel = this.LJI) == null || videoPublishEditModel.clickGoNextBtnTime == -1)) {
            this.LJIILL = true;
            long currentTimeMillis = System.currentTimeMillis() - this.LJI.clickGoNextBtnTime;
            AnonymousClass6J4 r9 = new AnonymousClass6J4();
            r9.LIZ("shoot_way", this.LJI.mShootWay);
            r9.LIZ("enter_from", this.LJI.enterFrom);
            r9.LIZ("content_type", C30456Gd.LIZJ(this.LJI));
            r9.LIZ("content_source", C30456Gd.LIZ(this.LJI));
            r9.LIZ("creation_id", this.LJI.getCreationId());
            if (AnonymousClass54Z.LIZ(AnonymousClass54Y.LJFF)) {
                str = "1";
            } else {
                str = "0";
            }
            r9.LIZ("is_nle", str);
            r9.LIZ("first_ui_frame_duration", currentTimeMillis);
            r9.LIZ("resolution", this.LJI.getVideoResolution());
            r9.LIZ("first_frame_duration", currentTimeMillis);
            Cwu<Integer, Integer> LIZ = C38386eS.LIZ(this.LJI);
            if (((Integer) LIZ.getFirst()).intValue() + ((Integer) LIZ.getSecond()).intValue() <= 1) {
                i = 0;
            }
            r9.LIZ("is_multi_content", i);
            0Gp.LIZ(new C43116m5(this, r9));
            C43016lv.LIZ.LIZ("click_next_in_edit", currentTimeMillis);
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r0v19, types: [com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity$1, android.view.View$OnClickListener] */
    private void LJIIJ() {
        final boolean LJIIIZ2 = LJIIIZ();
        if (!LJIIIZ2) {
            if (this.LJI.mIsFromDraft && !this.LJI.isFromRestoreRecover) {
                this.LIZLLL.setVisibility(0);
            }
            this.LJI.challenges = (List) getIntent().getSerializableExtra("challenge");
        } else {
            this.LJIIIIZZ.setText(2131821990);
            this.LIZLLL.setVisibility(0);
            if (this.LJI.isShoutout()) {
                this.LJIIIIZZ.setText("");
                this.LIZLLL.setVisibility(8);
            }
            this.LJI.mIsFromDraft = true;
            VideoLengthChecker.LIZ().LIZ(this, this.LJI);
            LJIIL();
            C35526Zq.LIZ("[Filter Intensity] VideoPublishActivity FromDraftBox mSelectedFilterIntensity:" + this.LJI.mSelectedFilterIntensity + " mSelectedId:" + this.LJI.mSelectedId + " mUseFilter:" + this.LJI.mUseFilter);
        }
        this.LIZLLL.setOnClickListener(new C43066m0(this, LJIIIZ2));
        this.LJIIIIZZ.setOnClickListener(new O3w() {
            static {
                Covode.recordClassIndex(112838);
            }

            public final void LIZ(View view) {
                VideoPublishActivity.this.LJII = System.currentTimeMillis();
                VideoPublishActivity.this.LJII().LIZ(LJIIIZ2, VideoPublishActivity.this.LJI.mIsFromDraft);
            }
        });
        if (C30456Gd.LJIILL(this.LJI) && C43146m8.LIZ()) {
            findViewById(2131369078).setVisibility(8);
        }
        LJIIJJI();
        Bundle bundle = new Bundle();
        C30456Gd.LIZ(bundle, this.LJI);
        bundle.putInt("music_rec_type", getIntent().getIntExtra("music_rec_type", -1));
        bundle.putInt("extra_stick_point_type", getIntent().getIntExtra("extra_stick_point_type", 0));
        bundle.putBoolean("enter_record_from_other_platform", this.LJIIJ);
        bundle.putBoolean("extra_enter_from_live", this.LJIILIIL);
        bundle.putBoolean("edit_publish_session_end_together", getIntent().getBooleanExtra("edit_publish_session_end_together", false));
        if (getIntent().getBooleanExtra("review_video_fast_publish", false)) {
            bundle.putBoolean("review_video_fast_publish", true);
        }
        bundle.putString("wording", LIZ(getIntent(), "wording"));
        0AA supportFragmentManager = getSupportFragmentManager();
        VideoPublishFragment LIZ = supportFragmentManager.LIZ(2131365158);
        this.LJFF = LIZ;
        if (LIZ == null) {
            VideoPublishFragment videoPublishFragment = new VideoPublishFragment();
            this.LJFF = videoPublishFragment;
            videoPublishFragment.setArguments(bundle);
            0AP LIZ2 = supportFragmentManager.LIZ();
            LIZ2.LIZ(2131365158, this.LJFF);
            LIZ2.LIZIZ();
        }
        AutoSelectedAnchorInfos autoSelectedAnchorInfos = this.LJI.creativeFlowData.getAutoSelectedAnchorInfos();
        if (!(autoSelectedAnchorInfos.getAnchorSourceType() == null && autoSelectedAnchorInfos.getOpenPlatformShareId() == null)) {
            AnchorAutoSelectionService.LIZ.LIZ(autoSelectedAnchorInfos.getOpenPlatformClientKey(), autoSelectedAnchorInfos.getOpenPlatFormExtra(), autoSelectedAnchorInfos.getAnchorSourceType(), autoSelectedAnchorInfos.getOpenPlatformAddFrom(), autoSelectedAnchorInfos.getOpenPlatformShareId()).LIZ(new 2(this, autoSelectedAnchorInfos), 0Gp.LIZIZ, (0Gf) null);
        }
        LIZ(LJIIIZ2);
        Szo LIZ3 = Szo.LIZIZ.LIZ(this);
        LIZ3.LIZ(2131099659);
        LIZ3.LIZLLL(2131099659);
        LIZ3.LIZ(true);
        LIZ3.LIZ.LIZJ();
    }

    public static Bundle LIZ(Intent intent) {
        try {
            return intent.getExtras();
        } catch (Exception unused) {
            return null;
        }
    }

    public static 0Bx LIZ(1hK r2) {
        0Bx LIZ = 0By.LIZ(r2, (0Bv) null);
        if (2GD.LIZ) {
            0Bs.LIZ(LIZ, r2);
        }
        return LIZ;
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [android.content.Context, X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity] */
    public void onSaveInstanceState(Bundle bundle) {
        VideoPublishActivity.super.onSaveInstanceState(bundle);
        C539678o r0 = C539678o.LJ;
        getIntent();
        r0.LIZ((Context) this, bundle);
    }

    private void LIZ(boolean z) {
        C43376mV.LIZ(this.LJI, z);
        C43376mV.LIZ(this.LJI);
    }

    public final /* synthetic */ Void LIZ(AnonymousClass6J4 r4) {
        r4.LIZ("original_resolution", AnonymousClass655.LJIILL(this.LJI));
        C42786lY.LIZ.LIZ("tool_performance_publish_first_frame", r4.LIZ);
        return null;
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [android.content.Context, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity] */
    public final /* synthetic */ 2Pr LIZ(Boolean bool) {
        boolean z;
        C43056lz r13;
        String str;
        ExpandedTitleModule expandedTitleModule;
        VideoPublishFragment videoPublishFragment = this.LJFF;
        if (videoPublishFragment.LJJJJJ == null || (expandedTitleModule = videoPublishFragment.LJJJJJ.LIZJ) == null || !expandedTitleModule.LIZJ()) {
            z = false;
        } else {
            expandedTitleModule.LJ();
            z = true;
        }
        if (z) {
            return null;
        }
        if (this.LJI.isShoutout()) {
            SxS sxS = new SxS(this);
            sxS.LIZIZ(2131824751);
            sxS.LIZ(2131824750, new C43186mC(this));
            sxS.LIZIZ(2131824752, C43296mN.LIZ);
            sxS.LIZ().LIZIZ();
            return null;
        } else if (NPk.LIZ(this.LJI)) {
            3BB r1 = new 3BB(this);
            r1.LIZIZ(2131821335);
            r1.LIZIZ();
            return null;
        } else {
            if (!bool.booleanValue()) {
                MobClick obtain = MobClick.obtain();
                obtain.setEventName("back_to_edit");
                obtain.setLabelName("edit_page");
                2nK.onEvent(obtain);
                if (this.LJI == null) {
                    C35526Zq.LIZJ("VideoPublishActivity model == null saveInfoForEdit failed");
                } else {
                    int LIZ = 7b4.LIZ(this);
                    VideoPublishEditModel videoPublishEditModel = this.LJI;
                    C31176Ix.LIZ(LIZ, videoPublishEditModel, (Intent) null, C41576jb.LIZ(videoPublishEditModel.videoPath()), "click_back_button");
                    VideoPublishFragment LIZ2 = getSupportFragmentManager().LIZ(2131365158);
                    LIZ2.LIZJ("enter_video_edit_page");
                    if (LIZ2.isAdded()) {
                        LIZ2.LIZ(false);
                    }
                    LIZ2.LJII();
                    VideoPublishEditModel videoPublishEditModel2 = LIZ2.LJJIIZ;
                    String str2 = videoPublishEditModel2.title;
                    String chain = videoPublishEditModel2.getChain();
                    boolean z2 = videoPublishEditModel2.disableDeleteChain;
                    List<AVTextExtraStruct> list = videoPublishEditModel2.structList;
                    int i = videoPublishEditModel2.isPrivate;
                    List<AVChallenge> list2 = videoPublishEditModel2.challenges;
                    M12.LIZ(videoPublishEditModel2);
                    if (videoPublishEditModel2.isMvThemeVideoType()) {
                        r13 = new C43056lz(videoPublishEditModel2.mvCreateVideoData.videoCoverStartTime, videoPublishEditModel2.mvCreateVideoData.videoCoverImgPath, videoPublishEditModel2.getCoverPublishModel());
                    } else {
                        r13 = new C43056lz((int) (videoPublishEditModel2.mVideoCoverStartTm * 1000.0f), videoPublishEditModel2.getCoverPublishModel());
                    }
                    StickerChallenge stickerChallenge = videoPublishEditModel2.stickerChallenge;
                    CompileProbeResult compileProbeResult = videoPublishEditModel2.getCompileProbeResult();
                    List<String> list3 = videoPublishEditModel2.geofencingSetting;
                    C42986ls r5 = r6;
                    C42986ls r6 = new C42986ls(str2, chain, z2, list, i, list2, r13, stickerChallenge, compileProbeResult, list3, videoPublishEditModel2.changeStickerStruct, new C43306mO());
                    r5.LJIIIZ = videoPublishEditModel2.commentSetting;
                    r5.LJIILIIL = videoPublishEditModel2.commerceData;
                    r5.LJIJ = videoPublishEditModel2.allowAutoCaptionSetting;
                    r5.LJIJI = videoPublishEditModel2.autoCaptionLang;
                    r5.LJIILJJIL = videoPublishEditModel2.allowDownloadSetting;
                    r5.LJIILLIIL = videoPublishEditModel2.excludeUserList;
                    r5.LJIIZILJ = videoPublishEditModel2.allowRecommend;
                    r5.LJIJJLI = videoPublishEditModel2.isDraftMusicIllegal;
                    r5.LJIL = videoPublishEditModel2.playlist_name;
                    r5.LJJ = videoPublishEditModel2.playlist_id;
                    r5.LJJII = videoPublishEditModel2.creativeFlowData.getCommerceToolsModel().getMusicUsageConfirmation();
                    r5.LJJIII = videoPublishEditModel2.tagUserList;
                    r5.LJJIIJ = videoPublishEditModel2.getImageAlbumData();
                    r5.LJ = videoPublishEditModel2.heading;
                    r5.LJIJJ = videoPublishEditModel2.creativeFlowData.getCommerceToolsModel().getTcmModel();
                    r5.LJJIIZ = videoPublishEditModel2.creativeFlowData.getPublishConfig().getMatureTheme();
                    DuetStickerStruct LIZ3 = C43496mh.LIZ(videoPublishEditModel2.getMainBusinessContext());
                    if (!(LIZ3 == null || LIZ3.getUserList() == null || LIZ3.getUserList().size() <= 0)) {
                        for (DuetStickerUserStruct duetStickerUserStruct : LIZ3.getUserList()) {
                            r5.LJJIIJZLJL.add(duetStickerUserStruct.LJ);
                        }
                    }
                    FSD fsd = LIZ2.LJIILL;
                    M12.LIZ(r5);
                    CharSequence LIZIZ = fsd.LIZIZ.LIZIZ.LIZJ().LIZIZ();
                    if (LIZIZ != null) {
                        str = LIZIZ.toString();
                    } else {
                        str = null;
                    }
                    r5.LIZ = str;
                    r5.LIZIZ = fsd.LIZIZ.LIZIZ.LJ().LIZ(fsd.LIZ);
                    CqM.LIZ(r5);
                }
            } else {
                LJIIIIZZ();
            }
            VideoPublishEditModel videoPublishEditModel3 = this.LJI;
            if (videoPublishEditModel3 != null) {
                CommerceToolsTcmModel tcmModel = videoPublishEditModel3.creativeFlowData.getCommerceToolsModel().getTcmModel();
                if (TextUtils.equals(tcmModel.getBrandedContentSwitch(), "0")) {
                    tcmModel.setTcmPreventSelfSee(1);
                }
            }
            LIZ("back event");
            return null;
        }
    }

    /* JADX WARNING: type inference failed for: r15v0, types: [X.1hK, X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    /* JADX WARNING: type inference failed for: r6v0, types: [android.content.Context, X.1hK, X.Ltg, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, X.1oX, android.app.Activity] */
    /* JADX WARNING: type inference failed for: r3v1, types: [android.content.Context, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onCreate(android.os.Bundle r35) {
        /*
            r34 = this;
            r15 = r34
            r6 = r15
            r7 = r35
            X.8gF.LIZ(r15, r7)
            java.lang.String r8 = "com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity"
            java.lang.String r5 = "onCreate"
            r3 = 1
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r8, r5, r3)
            java.lang.String r0 = "VideoPublishActivity onCreate"
            X.C35526Zq.LIZLLL(r0)
            X.Ng0 r0 = X.AnonymousClass56Y.LIZ
            java.lang.String r10 = "av_video_publish"
            r0.step(r10, r5)
            X.Ng0 r1 = X.AnonymousClass56Y.LIZ
            java.lang.String r0 = "video_publish"
            r1.enter(r6, r0)
            int r4 = X.MFA.LIZIZ()
            int r0 = X.MFA.LIZJ()
            long r0 = (long) r0
            java.lang.String r2 = "tool_publish_enter"
            X.MW9.LIZ(r2, r4, r0)
            X.6mJ r0 = X.C43256mJ.LIZ
            X.MV8.LIZ(r6, r0)
            boolean r0 = X.Fnr.LIZ()
            r4 = 0
            if (r0 == 0) goto L_0x0045
            int r0 = X.Fnq.LIZ()
        L_0x0041:
            X.Fnq.LIZ(r6, r0)
            goto L_0x0047
        L_0x0045:
            r0 = 0
            goto L_0x0041
        L_0x0047:
            com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity.super.onCreate(r7)     // Catch:{ Exception -> 0x004b }
            goto L_0x005f
        L_0x004b:
            r1 = move-exception
            boolean r0 = X.7gy.LIZ(r7, r1)
            if (r0 == 0) goto L_0x0363
            boolean r0 = X.7gy.LIZ(r15)
            if (r0 == 0) goto L_0x0363
            java.lang.String r1 = "VideoPublishActivity"
            java.lang.String r0 = "view state restore crash fixed"
            X.C35526Zq.LIZ((java.lang.String) r1, (java.lang.String) r0)
        L_0x005f:
            r6.LJIIL = r3
            r0 = 2131558529(0x7f0d0081, float:1.8742376E38)
            r6.setContentView(r0)
            r0 = 2131362569(0x7f0a0309, float:1.8344922E38)
            android.view.View r0 = r6.findViewById(r0)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r6.LJIIIIZZ = r0
            r0 = 2131363121(0x7f0a0531, float:1.8346042E38)
            android.view.View r0 = r6.findViewById(r0)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r6.LIZLLL = r0
            r0 = 2131369074(0x7f0a1c72, float:1.8358116E38)
            android.view.View r0 = r6.findViewById(r0)
            android.widget.TextView r0 = (android.widget.TextView) r0
            r6.LJ = r0
            android.content.Intent r2 = r15.getIntent()
            X.78o r0 = X.C539678o.LJ
            r0.LIZ((android.content.Context) r6, (android.content.Intent) r2, (android.os.Bundle) r7)
            java.lang.String r0 = "enter_record_from_other_platform"
            boolean r0 = r2.getBooleanExtra(r0, r4)     // Catch:{ RuntimeException -> 0x00b0 }
            r6.LJIIJ = r0     // Catch:{ RuntimeException -> 0x00b0 }
            java.lang.String r0 = "extra_enter_from_live"
            boolean r0 = r2.getBooleanExtra(r0, r4)     // Catch:{ RuntimeException -> 0x00b0 }
            r6.LJIILIIL = r0     // Catch:{ RuntimeException -> 0x00b0 }
            java.lang.String r0 = "extra_enter_from_shoutout_sync"
            boolean r0 = r2.getBooleanExtra(r0, r4)     // Catch:{ RuntimeException -> 0x00b0 }
            r6.LJIILJJIL = r0     // Catch:{ RuntimeException -> 0x00b0 }
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = X.C30456Gd.LIZ((android.content.Intent) r2)     // Catch:{ RuntimeException -> 0x00b0 }
            r6.LJI = r0     // Catch:{ RuntimeException -> 0x00b0 }
            goto L_0x010e
        L_0x00b0:
            r12 = move-exception
            android.content.Intent r0 = r15.getIntent()
            android.os.Bundle r0 = LIZ((android.content.Intent) r0)
            if (r0 == 0) goto L_0x0360
            android.content.Intent r0 = r15.getIntent()
            android.os.Bundle r0 = LIZ((android.content.Intent) r0)
            int r11 = X.C43476mf.LIZ((android.os.Bundle) r0)
        L_0x00c7:
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            java.lang.String r0 = "StickerInfo, "
            r1.<init>(r0)
            java.lang.String r0 = r12.getMessage()
            r1.append(r0)
            java.lang.String r0 = ", bundleSize: "
            r1.append(r0)
            r1.append(r11)
            java.lang.String r0 = r1.toString()
            X.C35526Zq.LIZIZ((java.lang.String) r0)
            X.FWb r0 = X.FWb.LIZIZ
            X.7CX r0 = r0.LIZ()
            X.MpP r9 = r0.LJJIJLIJ()
            X.6tB r7 = new X.6tB
            r7.<init>()
            java.lang.String r1 = r12.getMessage()
            java.lang.String r0 = "exception"
            r7.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.lang.Integer r1 = java.lang.Integer.valueOf(r11)
            java.lang.String r0 = "bundleSize"
            r7.LIZ((java.lang.String) r0, (java.lang.Integer) r1)
            org.json.JSONObject r1 = r7.LIZ()
            java.lang.String r0 = "bundle_stickerinfo"
            r9.LIZ(r0, r4, r1)
        L_0x010e:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r6.LJI
            if (r0 != 0) goto L_0x02c8
            boolean r0 = r6.LJIILJJIL
            if (r0 == 0) goto L_0x02b1
            X.6kI r1 = new X.6kI
            java.lang.String r0 = "shoutOuts"
            r1.<init>(r0)
            java.lang.String r0 = "extra_shoutout_video_path"
            java.lang.String r7 = LIZ((android.content.Intent) r2, (java.lang.String) r0)
            java.lang.String r0 = "extra_shoutout_pid"
            java.lang.String r14 = LIZ((android.content.Intent) r2, (java.lang.String) r0)
            java.lang.String r0 = "extra_shoutout_music_id"
            java.lang.String r13 = LIZ((android.content.Intent) r2, (java.lang.String) r0)
            com.ss.android.ugc.aweme.creative.CreativeInfo r1 = X.C50266xc.LIZIZ(r2)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = new com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel
            r0.<init>()
            r6.LJI = r0
            r0.creativeInfo = r1
            r0.mOrigin = r4
            r0.mFromCut = r3
            r0.isFastImport = r3
            java.lang.String r1 = X.C43536ml.shootWay
            r0.mShootWay = r1
            r1 = 10
            int[] r1 = new int[r1]
            int r6 = com.ss.android.vesdk.VEUtils.getVideoFileInfo(r7, r1)
            if (r6 != 0) goto L_0x0259
            com.ss.android.ugc.aweme.shortvideo.edit.model.VideoFileInfo r6 = new com.ss.android.ugc.aweme.shortvideo.edit.model.VideoFileInfo
            r19 = r1[r4]
            r20 = r1[r3]
            r9 = 3
            r9 = r1[r9]
            long r11 = (long) r9
            r17 = 7
            r23 = r1[r17]
            r16 = 6
            r24 = r1[r16]
            r18 = r6
            r21 = r11
            r18.<init>(r19, r20, r21, r23, r24)
            com.ss.android.ugc.aweme.shortvideo.edit.model.EditVideoSegment r9 = new com.ss.android.ugc.aweme.shortvideo.edit.model.EditVideoSegment
            r11 = 0
            r9.<init>(r7, r11, r6)
            com.ss.android.ugc.aweme.shortvideo.edit.model.VideoCutInfo r6 = new com.ss.android.ugc.aweme.shortvideo.edit.model.VideoCutInfo
            r19 = 0
            com.ss.android.ugc.aweme.shortvideo.edit.model.VideoFileInfo r11 = r9.getVideoFileInfo()
            long r21 = r11.getDuration()
            r23 = 1065353216(0x3f800000, float:1.0)
            r24 = 0
            r18 = r6
            r18.<init>(r19, r21, r23, r24)
            r9.setVideoCutInfo(r6)
            java.util.ArrayList r11 = new java.util.ArrayList
            r11.<init>()
            r11.add(r9)
            X.5OY r12 = new X.5OY
            X.FWb r6 = X.FWb.LIZIZ
            X.7CX r6 = r6.LIZ()
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r6 = r6.LJIIJ()
            int r9 = r6.getVideoWidth()
            X.FWb r6 = X.FWb.LIZIZ
            X.7CX r6 = r6.LIZ()
            com.ss.android.ugc.aweme.services.video.IVideoConfigService r6 = r6.LJIIJ()
            int r6 = r6.getVideoHeight()
            r12.<init>(r9, r6)
            com.ss.android.ugc.aweme.shortvideo.edit.model.EditPreviewInfo r6 = r12.LIZ(r11)
            r0.setPreviewInfo(r6)
            r0.videoWidth()
            java.util.ArrayList r6 = new java.util.ArrayList
            r6.<init>()
            com.ss.android.ugc.aweme.shortvideo.ImportVideoInfo r18 = new com.ss.android.ugc.aweme.shortvideo.ImportVideoInfo
            r19 = r1[r4]
            r20 = r1[r3]
            r21 = r1[r16]
            r3 = 8
            r22 = r1[r3]
            r4 = 3
            r3 = r1[r4]
            long r11 = (long) r3
            r3 = r1[r4]
            long r3 = (long) r3
            r28 = 0
            r29 = 0
            r30 = r1[r17]
            r31 = 1065353216(0x3f800000, float:1.0)
            r1 = r18
            r9 = 0
            r9 = 3
            r32 = r7
            r33 = r7
            r23 = r7
            r24 = r11
            r26 = r3
            r18.<init>(r19, r20, r21, r22, r23, r24, r26, r28, r29, r30, r31, r32, r33)
            r6.add(r1)
            r0.importInfoList = r6
            X.5hC r1 = X.C14605hC.LIZ
            com.ss.android.ugc.aweme.shortvideo.WorkSpace.Workspace r3 = r1.LIZ(r0)
            java.io.File r1 = r3.LJII()
            java.lang.String r1 = r1.getPath()
            r0.mOutputFile = r1
            java.io.File r1 = r3.LJIIIIZZ()
            java.lang.String r1 = r1.getPath()
            r0.mEncodedAudioOutputFile = r1
            java.io.File r1 = r3.LJIIIZ()
            java.lang.String r1 = r1.getPath()
            r0.mParallelUploadOutputFile = r1
            r1 = 1
            r0.videoCount = r1
            r3 = 1065353216(0x3f800000, float:1.0)
            r0.voiceVolume = r3
            r1 = -1
            r0.mShootMode = r1
            r1 = 0
            r0.mDuetFrom = r1
            r0.musicVolume = r3
            X.FWb r1 = X.FWb.LIZIZ
            X.7CX r1 = r1.LIZ()
            r1.LIZJ()
            r1 = 3
            r0.setNewVersion(r1)
            r0.generateVideoCoverPath()
            X.5u2 r4 = new X.5u2
            r4.<init>(r0)
            X.6ml r1 = new X.6ml
            r1.<init>()
            r0.mShoutOutsData = r1
            X.6ml r3 = r0.mShoutOutsData
            java.lang.String r1 = X.C43536ml.MODE_POST
            r3.setShoutOutsMode(r1)
            X.6ml r1 = r0.mShoutOutsData
            r1.setProductId(r14)
            X.6ml r1 = r0.mShoutOutsData
            r1.setMusicId(r13)
            X.6ml r0 = r0.mShoutOutsData
            r0.setPostVideoPath(r7)
            r0 = 0
            r4.LIZ(r0, r0)
        L_0x0259:
            r15.LJIIJ()
        L_0x025c:
            r3 = r15
        L_0x025d:
            boolean r0 = X.C24045wQ.LIZIZ()
            if (r0 == 0) goto L_0x0281
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            if (r0 == 0) goto L_0x0281
            boolean r0 = X.C30456Gd.LJIILL(r0)
            if (r0 == 0) goto L_0x0281
            X.FWb r0 = X.FWb.LIZIZ
            X.7CX r0 = r0.LIZ()
            X.6J1 r6 = r0.LJ()
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r4 = r3.LJI
            java.lang.String r1 = r4.getCreationId()
            r0 = 4
            r6.LIZ(r4, r1, r0)
        L_0x0281:
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            if (r0 == 0) goto L_0x029a
            java.lang.String r1 = "draft_to_edit_from"
            r0 = 0
            int r1 = r2.getIntExtra(r1, r0)
            r3.LJIIJJI = r1
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            r0.mDraftToEditFrom = r1
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r1 = r3.LJI
            boolean r0 = r1.isChangeMultiEditData()
            r1.mCropVideo = r0
        L_0x029a:
            java.lang.String r0 = "normal"
            X.6H0 r1 = X.NeJ.LIZ(r0)
            java.lang.String r0 = "at_post_page"
            r2 = 0
            r1.LIZ(r0, r2)
            X.Ng0 r1 = X.AnonymousClass56Y.LIZ
            java.lang.String r0 = "onCreate_end"
            r1.step(r10, r0)
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r8, r5, r2)
            return
        L_0x02b1:
            java.lang.String r4 = "VideoPublishActivity onCreate error, model == null"
            X.C35526Zq.LIZIZ((java.lang.String) r4)
            java.util.HashMap r3 = new java.util.HashMap
            r3.<init>()
            java.lang.String r1 = r2.toString()
            java.lang.String r0 = "intent"
            r3.put(r0, r1)
            X.TSt.LIZ(r4, r3)
            goto L_0x025c
        L_0x02c8:
            r0 = 1
            r15.LJIIJ()
            r3 = r15
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            boolean r0 = X.C41606je.LIZ((com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel) r0)
            if (r0 == 0) goto L_0x025d
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            boolean r0 = X.C41606je.LIZIZ((com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel) r0)
            if (r0 != 0) goto L_0x025d
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            X.C41606je.LIZJ(r0)
            com.ss.android.ugc.aweme.shortvideo.edit.VideoPublishEditModel r0 = r3.LJI
            com.ss.android.ugc.aweme.shortvideo.edit.model.EditPreviewInfo r1 = r0.getPreviewInfo()
            X.M12.LIZ(r1)
            int r0 = r1.getPreviewVideoLength()
            if (r0 == 0) goto L_0x035e
            int r1 = r1.getPreviewVideoLength()
            r0 = 61000(0xee48, float:8.5479E-41)
            if (r1 < r0) goto L_0x035e
            r0 = 1
        L_0x02fb:
            r7 = 2131824062(0x7f110dbe, float:1.9280941E38)
            r6 = 2131824060(0x7f110dbc, float:1.9280937E38)
            r4 = 2131824059(0x7f110dbb, float:1.9280935E38)
            if (r0 == 0) goto L_0x0338
            X.SxS r1 = new X.SxS
            r1.<init>(r3)
            X.6lx r0 = new X.6lx
            r0.<init>(r3)
            r1.LIZIZ(r4, r0)
            X.6lt r0 = new X.6lt
            r0.<init>(r3)
            r1.LIZ(r6, r0)
            r1.LIZ(r7)
            r0 = 2131824073(0x7f110dc9, float:1.9280964E38)
            r1.LIZIZ(r0)
            X.SxR r0 = r1.LIZ()
            r0.LIZ()
        L_0x032b:
            X.6J4 r0 = r15.LJI()
            java.util.Map<java.lang.String, java.lang.String> r1 = r0.LIZ
            java.lang.String r0 = "show_audio_clear_popup"
            X.2nK.LIZ(r0, r1)
            goto L_0x025d
        L_0x0338:
            X.SxS r1 = new X.SxS
            r1.<init>(r3)
            X.6ly r0 = new X.6ly
            r0.<init>(r3)
            r1.LIZIZ(r4, r0)
            X.6lu r0 = new X.6lu
            r0.<init>(r3)
            r1.LIZ(r6, r0)
            r1.LIZ(r7)
            r0 = 2131824061(0x7f110dbd, float:1.928094E38)
            r1.LIZIZ(r0)
            X.SxR r0 = r1.LIZ()
            r0.LIZ()
            goto L_0x032b
        L_0x035e:
            r0 = 0
            goto L_0x02fb
        L_0x0360:
            r11 = 0
            goto L_0x00c7
        L_0x0363:
            r0 = 0
            com.bytedance.apm.agent.v2.instrumentation.ActivityAgent.onTrace(r8, r5, r0)
            throw r1
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity.onCreate(android.os.Bundle):void");
    }

    public final void LIZ(int i) {
        if (this.LJFF.LJJIIJ != null) {
            this.LJFF.LJJIIJ.LIZIZ().LIZ(i);
        }
    }

    public final void LIZ(String str) {
        String str2;
        C42016kJ LIZ;
        VideoPublishFragment videoPublishFragment = this.LJFF;
        if (SettingsManager.LIZ().LIZ("tool_enable_publish_area_config", true)) {
            videoPublishFragment.LJIJI.setEnabled(false);
            videoPublishFragment.LJIJJ.setEnabled(false);
        }
        FWb.LIZIZ.LIZ().LJIILLIIL().LIZ("publish_page_finish");
        if (!TextUtils.isEmpty(str)) {
            C35526Zq.LIZ("VideoPublishActivity", "finish video publish page, reason: ".concat(String.valueOf(str)));
            C44156nl.LIZ().LJIIJJI = "";
            finish();
            FR4 LIZ2 = FR4.LIZ.LIZ();
            LIZ2.LIZ("publish_page_finish");
            Oie.LIZ(LIZ2.LIZ());
            if (FUR.LJ() && this.LJFF.LJJIIZ != null && !this.LJFF.LJJJJLI && this.LJFF.LJJIIZ.mDraftFilesAlreadySavedByPreTask && !this.LJFF.LJJIIZ.mUserClickedSaveDraftOrPublish && FUR.LIZ() && (str2 = Oie.LJFF) != null) {
                Oie.LJFF = null;
                if (36a.LIZ(str2) && (LIZ = FWb.LIZIZ.LIZ().LIZJ().LIZIZ().LIZ(new AnonymousClass73G(new CreativeInfo(str2, 0, (String) null, 6, (2HN) null)))) != null) {
                    LIZ.LJJJJLL = true;
                    FWb.LIZIZ.LIZ().LIZJ().LIZ().LIZ(new C39956gz(LIZ, new C39976h1("PublishParallel delete prepublish draft"), true, new C39736gd((4r1) null), 16));
                    return;
                }
                return;
            }
            return;
        }
        throw new IllegalArgumentException("finish reason can't be empty");
    }

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

    /* JADX WARNING: type inference failed for: r8v0, types: [com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public final /* synthetic */ 2Pr LIZ(Boolean bool, Boolean bool2) {
        AnonymousClass6J4 r7 = new AnonymousClass6J4();
        r7.LIZ("enter_from", "video_post_page");
        r7.LIZ("creation_id", this.LJI.getCreationId());
        r7.LIZ("prop_list", this.LJI.getStickers());
        r7.LIZ("from_prop_id", this.LJI.fromPropId);
        if (this.LJI.draftId != 0) {
            r7.LIZ("draft_id", this.LJI.draftId);
        }
        if (!TextUtils.isEmpty(this.LJI.newDraftId)) {
            r7.LIZ("new_draft_id", this.LJI.newDraftId);
        }
        if (this.LJI.mDraftToEditFrom == 0) {
            r7.LIZ("draft_way", "general_draft_list");
        }
        C42786lY.LIZ.LIZ("click_draft_edit_cancel", r7.LIZ);
        FWb.LIZIZ.LIZ().LIZJ().LIZ().LIZ(this.LJI.creativeInfo);
        if (!bool.booleanValue() && bool2.booleanValue()) {
            Intent intent = new Intent();
            if (this.LJIIJJI == 0) {
                intent.setFlags(536870912);
                NYc.LIZ().LIZ((Activity) this, intent, false);
            }
        }
        if (bool.booleanValue()) {
            FWb.LIZIZ.LIZ().LIZJ().LIZ(this.LJI.isDraftMusicIllegal);
            LIZ("cancel draft box edit");
            AnonymousClass6J4 r2 = new AnonymousClass6J4();
            r2.LIZ("creation_id", this.LJI.getCreationId());
            r2.LIZ("shoot_way", this.LJI.mShootWay);
            if (this.LJI.draftId != 0) {
                r2.LIZ("draft_id", this.LJI.draftId);
            }
            if (!TextUtils.isEmpty(this.LJI.newDraftId)) {
                r2.LIZ("new_draft_id", this.LJI.newDraftId);
            }
            2nK.LIZ("video_post_page_cancel", r2.LIZ);
        }
        FWb.LIZIZ.LIZ().LJIILLIIL().LIZIZ();
        return null;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [X.1hK, com.ss.android.ugc.aweme.shortvideo.ui.VideoPublishActivity, android.app.Activity] */
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        JMk.LIZ(this, i, iArr);
        VideoPublishActivity.super.onRequestPermissionsResult(i, strArr, iArr);
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        VideoPublishActivity.super.onActivityResult(i, i2, intent);
        VideoPublishFragment videoPublishFragment = this.LJFF;
        if (videoPublishFragment != null && videoPublishFragment.isAdded()) {
            this.LJFF.onActivityResult(i, i2, intent);
        }
    }
}
