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

import X.7he;
import X.9EH;
import X.AnonymousClass2GH;
import X.AnonymousClass2HX;
import X.AnonymousClass46U;
import X.C15522sK;
import X.C224738l;
import X.C33743gc;
import X.C33793gh;
import X.C34513hr;
import X.C49124Cy;
import X.C68284vE;
import X.Crj;
import X.EMi;
import X.EnQ;
import X.FDh;
import android.app.Activity;
import android.os.SystemClock;
import com.bytedance.covode.number.Covode;
import com.bytedance.keva.Keva;
import com.ss.android.ugc.aweme.journey.NewUserGuideAbility;
import kotlin.h.b.n;

public final class NewUserGuideAssem extends EnQ implements EMi, NewUserGuideAbility {
    public final Crj LJFF = 7he.LIZ(new C33793gh(this));
    public final Crj LJI = 7he.LIZ(new C33743gc(this));

    static {
        Covode.recordClassIndex(53543);
    }

    public final Activity LJIJJ() {
        return (Activity) this.LJFF.getValue();
    }

    /* JADX WARNING: type inference failed for: r2v0, types: [X.2GH, com.ss.android.ugc.aweme.assem.NewUserGuideAssem] */
    public final AnonymousClass2GH d_(String str) {
        if (str.hashCode() != -935865689) {
            return null;
        }
        return this;
    }

    public final boolean LJIJJLI() {
        return ((Boolean) this.LJI.getValue()).booleanValue();
    }

    public final void cZ_() {
        long uptimeMillis = SystemClock.uptimeMillis();
        NewUserGuideAssem.super.cZ_();
        if (!FDh.LIZLLL.LIZIZ()) {
            LJIL();
        }
        C49124Cy.LIZ(getClass().getCanonicalName(), SystemClock.uptimeMillis() - uptimeMillis, "ON_CREATE", (String) null);
    }

    private final void LJIL() {
        Activity LJIJJ = LJIJJ();
        if (LJIJJ != null) {
            AnonymousClass2HX.LIZ.LIZ("main_act_user_guide_observe", false);
            AnonymousClass2HX.LIZ.LIZ("method_create_calculate_newuser_value", false);
            AnonymousClass46U.LIZ.LIZ(LJIJJ(), LJIJJ.getIntent());
            AnonymousClass2HX.LIZ.LIZIZ("method_create_calculate_newuser_value", false);
            AnonymousClass2HX.LIZ.LIZ("method_create_welcome_duration", false);
            int LIZLLL = (int) 9EH.LJJIFFI.LIZLLL();
            C68284vE r0 = C34513hr.LIZ;
            n.LIZIZ(r0, "");
            C15522sK<Integer> LJIJJ2 = r0.LJIJJ();
            n.LIZIZ(LJIJJ2, "");
            Integer LIZLLL2 = LJIJJ2.LIZLLL();
            n.LIZIZ(LIZLLL2, "");
            if (LIZLLL > LIZLLL2.intValue()) {
                Keva.getRepo("repo_new_version_journey").storeBoolean("key_new_version", true);
                Keva repo = Keva.getRepo("repo_story_cold_start");
                if (repo.getBoolean("key_new_user", false)) {
                    repo.storeBoolean("key_new_user", false);
                } else {
                    repo.storeBoolean("key_new_version", true);
                }
            }
            C224738l.LJIIL.LIZ().LIZ(C224738l.LJIIL.LIZ(LJIJJ.getIntent()));
            if (C224738l.LJIIL.LIZ().LJII()) {
                AnonymousClass46U.LIZ.LIZ(LJIJJ, true, false);
            }
            AnonymousClass2HX.LIZ.LIZIZ("method_create_welcome_duration", false);
            C224738l.LJIIL.LIZ().LIZ(C224738l.LJIIL.LIZ(LJIJJ.getIntent()));
            AnonymousClass2HX.LIZ.LIZIZ("main_act_user_guide_observe", false);
        }
    }

    public final void LIZ(boolean z, boolean z2) {
        NewUserGuideAssem.super.LIZ(z, z2);
        if (FDh.LIZLLL.LIZIZ()) {
            LJIL();
        }
    }
}
