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

import X.AnonymousClass7lW;
import X.C25978fM;
import X.C26318fu;
import X.C26568gJ;
import X.C26578gK;
import X.C26598gM;
import X.C26788gf;
import X.Cwu;
import X.M12;
import android.content.Context;
import com.bytedance.android.livesdkapi.host.IHostAppBundle;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.ugc.aweme.plugin.service.IPluginService;
import com.ss.android.ugc.aweme.plugin.aab.AabPluginServiceImpl;

public final class LiveHostAppBundle implements IHostAppBundle {
    static {
        Covode.recordClassIndex(90955);
    }

    public final void onInit() {
    }

    public final boolean LIZ(String str) {
        M12.LIZ(str);
        IPluginService LIZJ = AabPluginServiceImpl.LIZJ();
        if (LIZJ != null) {
            return LIZJ.LIZ(str);
        }
        return false;
    }

    public final Cwu<Boolean, String> LIZ(Context context) {
        M12.LIZ(context);
        IPluginService LIZJ = AabPluginServiceImpl.LIZJ();
        if (LIZJ == null) {
            return new Cwu<>(false, "aabService is null");
        }
        C26788gf LIZIZ = LIZJ.LIZIZ();
        Context applicationContext = context.getApplicationContext();
        if (AnonymousClass7lW.LIZJ && applicationContext == null) {
            applicationContext = AnonymousClass7lW.LIZ;
        }
        return new Cwu<>(Boolean.valueOf(LIZIZ.LIZ(applicationContext)), "");
    }

    public final void LIZ(C26578gK r5) {
        M12.LIZ(r5);
        IPluginService LIZJ = AabPluginServiceImpl.LIZJ();
        if (LIZJ != null) {
            C26318fu r3 = new C26318fu();
            r3.LIZ = r5.LIZ;
            r3.LIZJ = r5.LIZIZ;
            C25978fM r1 = new C25978fM();
            r1.LIZ = r5.LIZLLL;
            r1.LIZIZ = r5.LJ;
            r1.LIZJ = r5.LJFF;
            r1.LIZLLL = r5.LJI;
            r1.LJIIJ = r5.LJIIIIZZ;
            r1.LJIIJJI = r5.LJIIIZ;
            r1.LJII = r5.LJII;
            r3.LJFF = r1.LIZ();
            C26598gM r12 = r5.LIZJ;
            if (r12 != null) {
                r3.LIZLLL = new C26568gJ(r12);
            }
            LIZJ.LIZ(r3.LIZ());
        }
    }
}
