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

import X.FLR;
import X.Lnj;
import X.M12;
import X.MNH;
import X.MNP;
import X.MNR;
import X.MNT;
import android.app.Activity;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.tablet.api.ITabletService;

public final class TabletServiceProxy implements ITabletService {
    public static ITabletService LIZ;
    public static final MNR LIZIZ = new MNR((byte) 0);

    static {
        Covode.recordClassIndex(118425);
    }

    public final MNT LIZIZ() {
        return MNP.LIZ;
    }

    public final FLR LIZ() {
        FLR LIZ2;
        ITabletService LIZ3 = LIZIZ.LIZ();
        if (LIZ3 == null || (LIZ2 = LIZ3.LIZ()) == null) {
            return MNH.LIZ;
        }
        return LIZ2;
    }

    public static ITabletService LIZJ() {
        MethodCollector.i(1911);
        ITabletService iTabletService = (ITabletService) Lnj.LIZ(ITabletService.class, false);
        if (iTabletService != null) {
            MethodCollector.o(1911);
            return iTabletService;
        }
        Object LIZIZ2 = Lnj.LIZIZ(ITabletService.class, false);
        if (LIZIZ2 != null) {
            ITabletService iTabletService2 = (ITabletService) LIZIZ2;
            MethodCollector.o(1911);
            return iTabletService2;
        }
        if (Lnj.bH == null) {
            synchronized (ITabletService.class) {
                try {
                    if (Lnj.bH == null) {
                        Lnj.bH = new TabletServiceProxy();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(1911);
                    throw th;
                }
            }
        }
        TabletServiceProxy tabletServiceProxy = (TabletServiceProxy) Lnj.bH;
        MethodCollector.o(1911);
        return tabletServiceProxy;
    }

    public final void LIZ(Activity activity) {
        M12.LIZ(activity);
        ITabletService LIZ2 = LIZIZ.LIZ();
        if (LIZ2 != null) {
            LIZ2.LIZ(activity);
        }
    }
}
