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

import X.8Ze;
import X.9Ee;
import X.9Y3;
import X.AnonymousClass2b1;
import X.AnonymousClass4FE;
import X.AnonymousClass4UF;
import X.Lbq;
import X.Lnj;
import X.MKj;
import android.text.TextUtils;
import com.bytedance.common.utility.collection.WeakHandler;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.settingsrequest.api.ISettingsLegacyApi;
import java.util.concurrent.Callable;
import kotlin.h.b.n;

public final class SettingsLegacyImpl implements ISettingsLegacyApi {
    static {
        Covode.recordClassIndex(106778);
    }

    public final 8Ze LIZLLL() {
        return new RegisterStorageTask();
    }

    public final boolean LIZJ() {
        return SettingsRequestServiceImpl.LJIIIIZZ().LIZJ();
    }

    public final int LIZIZ() {
        n.LIZIZ(AnonymousClass4FE.LIZ, "");
        return 9Y3.LIZ(9Y3.LIZ(), true, "ins_share_type", 0);
    }

    public final MKj LIZ() {
        AnonymousClass4UF LIZ = AnonymousClass4UF.LIZ();
        n.LIZIZ(LIZ, "");
        if (LIZ.LIZ == null) {
            return SettingsRequestServiceImpl.LJIIIIZZ().LIZIZ();
        }
        return LIZ.LIZ;
    }

    public static ISettingsLegacyApi LJ() {
        MethodCollector.i(4243);
        ISettingsLegacyApi iSettingsLegacyApi = (ISettingsLegacyApi) Lnj.LIZ(ISettingsLegacyApi.class, false);
        if (iSettingsLegacyApi != null) {
            MethodCollector.o(4243);
            return iSettingsLegacyApi;
        }
        Object LIZIZ = Lnj.LIZIZ(ISettingsLegacyApi.class, false);
        if (LIZIZ != null) {
            ISettingsLegacyApi iSettingsLegacyApi2 = (ISettingsLegacyApi) LIZIZ;
            MethodCollector.o(4243);
            return iSettingsLegacyApi2;
        }
        if (Lnj.bd == null) {
            synchronized (ISettingsLegacyApi.class) {
                try {
                    if (Lnj.bd == null) {
                        Lnj.bd = new SettingsLegacyImpl();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(4243);
                    throw th;
                }
            }
        }
        SettingsLegacyImpl settingsLegacyImpl = (SettingsLegacyImpl) Lnj.bd;
        MethodCollector.o(4243);
        return settingsLegacyImpl;
    }

    public final Lbq LIZ(String str) {
        PopupSettingManager popupSettingManager = AnonymousClass2b1.LIZ;
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        Lbq lbq = popupSettingManager.LIZJ.get(str);
        popupSettingManager.LIZJ.put(str, (Object) null);
        return lbq;
    }

    public final void LIZ(WeakHandler weakHandler, int i, int i2) {
        MethodCollector.i(4220);
        if (weakHandler == null) {
            MethodCollector.o(4220);
            return;
        }
        PopupSettingManager popupSettingManager = AnonymousClass2b1.LIZ;
        popupSettingManager.LIZIZ.put(weakHandler, Integer.valueOf(i));
        synchronized (popupSettingManager) {
            try {
                if (!popupSettingManager.LJ) {
                    popupSettingManager.LJ = true;
                    9Ee.LIZ().LIZ(popupSettingManager.LIZ, new Callable(i2) {
                        public final /* synthetic */ int LIZ;

                        static {
                            /*
                                r0 = 106771(0x1a113, float:1.49618E-40)
                                com.bytedance.covode.number.Covode.recordClassIndex(r0)
                                return
                            */
                            throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.settingsrequest.PopupSettingManager.AnonymousClass1.<clinit>():void");
                        }

                        public final java.lang.Object call(
/*
Method generation error in method: com.ss.android.ugc.aweme.settingsrequest.PopupSettingManager.1.call():java.lang.Object, dex: classes2.dex
                        jadx.core.utils.exceptions.JadxRuntimeException: Method args not loaded: com.ss.android.ugc.aweme.settingsrequest.PopupSettingManager.1.call():java.lang.Object, class status: UNLOADED
                        	at jadx.core.dex.nodes.MethodNode.getArgRegs(MethodNode.java:278)
                        	at jadx.core.codegen.MethodGen.addDefinition(MethodGen.java:116)
                        	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:313)
                        	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:271)
                        	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:240)
                        	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                        	at java.util.ArrayList.forEach(ArrayList.java:1259)
                        	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                        	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                        	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
                        	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
                        	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                        	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                        	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                        	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
                        	at jadx.core.codegen.ClassGen.addInnerClsAndMethods(ClassGen.java:236)
                        	at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:227)
                        	at jadx.core.codegen.InsnGen.inlineAnonymousConstructor(InsnGen.java:676)
                        	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:607)
                        	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:364)
                        	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:231)
                        	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:123)
                        	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:107)
                        	at jadx.core.codegen.InsnGen.generateMethodArguments(InsnGen.java:787)
                        	at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:728)
                        	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:368)
                        	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:250)
                        	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:221)
                        	at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:109)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:98)
                        	at jadx.core.codegen.RegionGen.makeIf(RegionGen.java:142)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:62)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:98)
                        	at jadx.core.codegen.RegionGen.makeTryCatch(RegionGen.java:311)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:68)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:98)
                        	at jadx.core.codegen.RegionGen.makeSynchronizedRegion(RegionGen.java:260)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:70)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                        	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                        	at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:211)
                        	at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:204)
                        	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:318)
                        	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:271)
                        	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:240)
                        	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                        	at java.util.ArrayList.forEach(ArrayList.java:1259)
                        	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                        	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                        	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
                        	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
                        	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                        	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                        	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                        	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
                        	at jadx.core.codegen.ClassGen.addInnerClsAndMethods(ClassGen.java:236)
                        	at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:227)
                        	at jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:112)
                        	at jadx.core.codegen.ClassGen.makeClass(ClassGen.java:78)
                        	at jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:44)
                        	at jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:33)
                        	at jadx.core.codegen.CodeGen.generate(CodeGen.java:21)
                        	at jadx.core.ProcessClass.generateCode(ProcessClass.java:61)
                        	at jadx.core.dex.nodes.ClassNode.decompile(ClassNode.java:273)
                        
*/
                    }, 1);
                    MethodCollector.o(4220);
                }
            } finally {
                MethodCollector.o(4220);
            }
        }
    }
}
