导航菜单

页面标题

页面副标题

CityMall v1.42.1 - LiftoffApiService.java 源代码

正在查看: CityMall v1.42.1 应用的 LiftoffApiService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.adster.sdk.mediation.liftoff;

import K6.i;
import android.content.Context;
import com.adster.sdk.mediation.analytics.AdIdentifierHelper;
import com.adster.sdk.mediation.analytics.ULID;
import com.adster.sdk.mediation.database.AdSterDatabaseContract;
import java.util.List;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.collections.p;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.j;
import kotlin.jvm.internal.k;
import org.jetbrains.annotations.NotNull;
import p7.s;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

@Metadata
public final class LiftoffApiService {
    private static AdIdentifierHelper adIdentifierHelper;
    private static String appId;
    private static String packageName;

    @NotNull
    public static final LiftoffApiService INSTANCE = new LiftoffApiService();

    @NotNull
    private static final String BASE_URL = "https://rtb.ads.vungle.com/";

    @NotNull
    private static final Lazy service$delegate = i.b(a.f10603a);

    public static final class a extends k implements Function0<LiftoffApi> {

        public static final a f10603a = new a();

        public a() {
            super(0);
        }

        public final Object invoke() {
            return (LiftoffApi) new Retrofit.Builder().baseUrl(LiftoffApiService.BASE_URL).client(new s.a().c()).addConverterFactory(GsonConverterFactory.create()).build().create(LiftoffApi.class);
        }
    }

    private LiftoffApiService() {
    }

    private final LiftoffApi getService() {
        Object value = service$delegate.getValue();
        j.h(value, "<get-service>(...)");
        return (LiftoffApi) value;
    }

    public final void build(@NotNull Context context, @NotNull String str) {
        j.i(context, "context");
        j.i(str, "appId");
        adIdentifierHelper = new AdIdentifierHelper(context);
        String packageName2 = context.getPackageName();
        j.h(packageName2, "context.packageName");
        packageName = packageName2;
        appId = str;
    }

    @NotNull
    public final Call<LiftoffAdResponse> getAd(@NotNull String str, @NotNull String str2) {
        Imp imp;
        j.i(str, AdSterDatabaseContract.Experiment.COLUMN_PLACEMENT);
        j.i(str2, "bidToken");
        LiftoffAdRequest liftoffAdRequest = new LiftoffAdRequest(null, null, null, null, null, 0, 63, null);
        liftoffAdRequest.setId(ULID.INSTANCE.generate());
        List<Imp> imp2 = liftoffAdRequest.getImp();
        if (imp2 != null && (imp = (Imp) p.f0(imp2)) != null) {
            imp.setId("1");
            imp.setTagid(str);
            imp.getExt().getVungle().setBidtoken(str2);
        }
        Device device = liftoffAdRequest.getDevice();
        AdIdentifierHelper adIdentifierHelper2 = adIdentifierHelper;
        String str3 = null;
        if (adIdentifierHelper2 == null) {
            j.A("adIdentifierHelper");
            adIdentifierHelper2 = null;
        }
        device.setUa(adIdentifierHelper2.getUserAgentString());
        AdIdentifierHelper adIdentifierHelper3 = adIdentifierHelper;
        if (adIdentifierHelper3 == null) {
            j.A("adIdentifierHelper");
            adIdentifierHelper3 = null;
        }
        device.setIfa(adIdentifierHelper3.getAdvertisingId());
        User user = liftoffAdRequest.getUser();
        AdIdentifierHelper adIdentifierHelper4 = adIdentifierHelper;
        if (adIdentifierHelper4 == null) {
            j.A("adIdentifierHelper");
            adIdentifierHelper4 = null;
        }
        user.setId(adIdentifierHelper4.getAdvertisingId());
        App app = liftoffAdRequest.getApp();
        String str4 = appId;
        if (str4 == null) {
            j.A("appId");
            str4 = null;
        }
        app.setId(str4);
        app.getPublisher().setId("655f28c6b3db8e0011b3c2e6");
        String str5 = packageName;
        if (str5 == null) {
            j.A("packageName");
        } else {
            str3 = str5;
        }
        app.setBundle(str3);
        liftoffAdRequest.setTest(0);
        return getService().getAd(liftoffAdRequest);
    }
}