VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce

以下内容为反编译后的 ar.java 源代码,内容仅作参考


package com.applovin.impl.adview;

import android.R;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.RelativeLayout;
import com.applovin.impl.sdk.dr;
import com.applovin.sdk.AppLovinLogger;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;

public class ar extends Dialog implements aq {
    private final Activity a;
    private final AppLovinSdk b;
    private final AppLovinLogger c;
    private final n d;
    private final com.applovin.impl.sdk.g e;
    private final String f;
    private RelativeLayout g;
    private ak h;

    public ar(com.applovin.impl.sdk.g gVar, String str, n nVar, Activity activity, AppLovinSdk appLovinSdk) {
        super(activity, R.style.Theme.Translucent.NoTitleBar);
        if (gVar == null) {
            throw new IllegalArgumentException("No ad specified");
        }
        if (nVar == null) {
            throw new IllegalArgumentException("No main view specified");
        }
        if (appLovinSdk == null) {
            throw new IllegalArgumentException("No sdk specified");
        }
        if (activity == null) {
            throw new IllegalArgumentException("No activity specified");
        }
        this.b = appLovinSdk;
        this.c = appLovinSdk.getLogger();
        this.a = activity;
        this.d = nVar;
        this.e = gVar;
        this.f = str;
        requestWindowFeature(1);
        setCancelable(false);
    }

    private int a(int i) {
        return AppLovinSdkUtils.dpToPx(this.a, i);
    }

    private void a(al alVar) {
        if (this.h != null) {
            this.c.w("ExpandedAdDialog", "Attempting to create duplicate close button");
            return;
        }
        this.h = ak.a(this.b, getContext(), alVar);
        this.h.setVisibility(8);
        this.h.setOnClickListener(new av(this));
        this.h.setClickable(false);
        dr drVar = new dr(this.b);
        int a = a(drVar.P());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a, a);
        layoutParams.addRule(10);
        layoutParams.addRule(drVar.S() ? 9 : 11);
        this.h.a(a);
        int a2 = a(drVar.R());
        int a3 = a(drVar.Q());
        layoutParams.setMargins(a3, a2, a3, 0);
        this.g.addView(this.h, layoutParams);
        this.h.bringToFront();
        int a4 = a(drVar.T());
        View view = new View(this.a);
        view.setBackgroundColor(0);
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(a + a4, a + a4);
        layoutParams2.addRule(10);
        layoutParams2.addRule(drVar.S() ? 9 : 11);
        layoutParams2.setMargins(a3 - a(5), a2 - a(5), a3 - a(5), 0);
        view.setOnClickListener(new aw(this));
        this.g.addView(view, layoutParams2);
        view.bringToFront();
    }

    private void b() {
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
        layoutParams.addRule(13);
        this.d.setLayoutParams(layoutParams);
        this.g = new RelativeLayout(this.a);
        this.g.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        this.g.setBackgroundColor(-1157627904);
        this.g.addView(this.d);
        if (!this.e.j()) {
            a(this.e.k());
            d();
        }
        setContentView(this.g);
    }

    public void c() {
        this.d.a("javascript:al_onCloseTapped();", new as(this));
    }

    private void d() {
        this.a.runOnUiThread(new ax(this));
    }

    public com.applovin.impl.sdk.g a() {
        return this.e;
    }

    @Override
    public void dismiss() {
        this.a.runOnUiThread(new au(this));
    }

    @Override
    public void onBackPressed() {
        this.d.a("javascript:al_onBackPressed();", new at(this));
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        b();
    }

    @Override
    protected void onStart() {
        super.onStart();
        try {
            Window window = getWindow();
            if (window != null) {
                window.setFlags(this.a.getWindow().getAttributes().flags, this.a.getWindow().getAttributes().flags);
                if (this.e.y()) {
                    window.addFlags(16777216);
                }
            } else {
                this.c.e("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
            }
        } catch (Throwable th) {
            this.c.e("ExpandedAdDialog", "Setting window flags failed.", th);
        }
    }
}