TikTok.apk(点击下载) / C35203Ds8.java


package X;

import android.app.Application;
import android.content.Context;
import com.bytedance.android.livesdk.livesetting.other.LivePipoHostSetting;
import com.bytedance.android.livesdk.livesetting.other.LivePipoMonitorHostSetting;
import com.bytedance.android.livesdkapi.host.IHostAction;
import com.bytedance.android.livesdkapi.host.IHostApp;
import com.bytedance.android.livesdkapi.host.IHostContext;
import com.bytedance.covode.number.Covode;
import com.ss.android.deviceregister.DeviceRegisterManager;
import java.util.HashMap;
import kotlin.g.b.m;

/* renamed from: X.Ds8  reason: case insensitive filesystem */
public final class C35203Ds8 {
    public static volatile boolean LIZ;
    public static final C35203Ds8 LIZIZ = new C35203Ds8();
    public static final C33869DRy LIZJ = new C33869DRy();
    public static final C35209DsE LIZLLL = new C35209DsE();
    public static volatile boolean LJ;

    static {
        Covode.recordClassIndex(8330);
        ((IHostApp) C524124w.LIZ(IHostApp.class)).registerLifeCycleCallback(new C33846DRb());
    }

    public static Context LIZ(Context context) {
        Context applicationContext = context.getApplicationContext();
        return (C16360kz.LIZJ && applicationContext == null) ? C16360kz.LIZ : applicationContext;
    }

    private final synchronized void LIZJ() {
        if (!LJ) {
            DeviceRegisterManager.addOnDeviceConfigUpdateListener(LIZJ);
            LJ = true;
        }
    }

    private String LIZLLL() {
        AbstractC524424z LIZ2 = C524124w.LIZ(IHostContext.class);
        m.LIZIZ(LIZ2, "");
        return ((IHostContext) LIZ2).isBoe() ? "10202010Wm7uNj" : "05816USpPkJiyBnttk";
    }

    public final synchronized boolean LIZ() {
        if (LIZ) {
            AbstractC35210DsF dsF = DSE.LIZ;
            m.LIZIZ(dsF, "");
            if (dsF.LIZ().hasInitEd()) {
                return true;
            }
        }
        String deviceId = DeviceRegisterManager.getDeviceId();
        if (AnonymousClass0NL.LIZ(deviceId)) {
            LIZJ();
            return false;
        }
        m.LIZIZ(deviceId, "");
        return LIZ(deviceId);
    }

    public final boolean LIZ(String str) {
        if (AnonymousClass0NL.LIZ(str)) {
            return false;
        }
        AbstractC524424z LIZ2 = C524124w.LIZ(IHostContext.class);
        m.LIZIZ(LIZ2, "");
        String iapKey = ((IHostContext) LIZ2).getIapKey();
        String LIZIZ2 = LIZIZ();
        HashMap hashMap = new HashMap();
        hashMap.put("iapKey", iapKey);
        hashMap.put("pipoHost", LIZIZ2);
        C35204Ds9 ds9 = new C35204Ds9();
        ds9.LIZ = ((IHostContext) C524124w.LIZ(IHostContext.class)).appId();
        ds9.LJFF = ((IHostContext) C524124w.LIZ(IHostContext.class)).appName();
        AbstractC524424z LIZ3 = C524124w.LIZ(IHostContext.class);
        m.LIZIZ(LIZ3, "");
        ds9.LIZJ = ((IHostContext) LIZ3).getVersionCodeInt();
        AbstractC524424z LIZ4 = C524124w.LIZ(IHostContext.class);
        m.LIZIZ(LIZ4, "");
        ds9.LIZLLL = ((IHostContext) LIZ4).getUpdateVersionCode();
        AbstractC524424z LIZ5 = C524124w.LIZ(IHostContext.class);
        m.LIZIZ(LIZ5, "");
        ds9.LJ = ((IHostContext) LIZ5).getChannel();
        ds9.LJI = true;
        C35207DsC dsC = new C35207DsC();
        dsC.LIZLLL = LIZIZ();
        dsC.LIZ = iapKey;
        dsC.LJ = C35206DsB.LIZ;
        dsC.LIZJ = LIZLLL();
        if (C33780DOn.LJFF.LIZ()) {
            dsC.LJII = true;
            dsC.LJI = false;
            hashMap.put("pay_method", "amazon");
        } else {
            dsC.LJII = false;
            dsC.LJI = true;
            hashMap.put("pay_method", "GP");
        }
        DM0.LIZ("ttlive_pipo_init", hashMap);
        C35208DsD LIZ6 = dsC.LIZ();
        Context LJ2 = C33241D3u.LJ();
        m.LIZIZ(LJ2, "");
        Context LIZ7 = LIZ(LJ2);
        m.LIZIZ(LIZ7, "");
        if (!(LIZ7 instanceof Application)) {
            return false;
        }
        C38199EzM ezM = new C38199EzM((Application) LIZ7, ds9);
        ezM.LIZLLL = str;
        ezM.LJIIZILJ = C33868DRx.LIZ;
        ezM.LJI = LivePipoMonitorHostSetting.INSTANCE.getValue();
        ezM.LJIILLIIL = LIZ6;
        ezM.LJFF = LIZIZ();
        C38198EzL LIZ8 = ezM.LIZ();
        AbstractC35210DsF dsF = DSE.LIZ;
        m.LIZIZ(dsF, "");
        dsF.LIZ().addIapObserver(LIZLLL);
        DSE.LIZ.LIZ(LIZ8);
        AbstractC35210DsF dsF2 = DSE.LIZ;
        AbstractC524424z LIZ9 = C524124w.LIZ(IHostAction.class);
        m.LIZIZ(LIZ9, "");
        dsF2.LIZ(((IHostAction) LIZ9).getTTSetting());
        LIZ = true;
        return true;
    }

    public final String LIZIZ() {
        if (C31482CYd.LIZ((CharSequence) LivePipoHostSetting.INSTANCE.getValue())) {
            return LivePipoHostSetting.INSTANCE.getValue();
        }
        AbstractC524424z LIZ2 = C524124w.LIZ(IHostApp.class);
        m.LIZIZ(LIZ2, "");
        return ((IHostApp) LIZ2).isInMusicallyRegion() ? "https://gp-va.tiktokv.com" : "https://gp-sg.tiktokv.com";
    }
}