Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c

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


package com.applovin.impl.adview;

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.ee;
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.m e;
    private final String f;
    private RelativeLayout g;
    private ak h;

    public ar(com.applovin.impl.sdk.m mVar, String str, n nVar, Activity activity, AppLovinSdk appLovinSdk) {
        super(activity, 16973840);
        if (mVar == 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 = mVar;
        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);
        ee eeVar = new ee(this.b);
        int a = a(eeVar.R());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a, a);
        layoutParams.addRule(10);
        layoutParams.addRule(eeVar.U() ? 9 : 11);
        this.h.a(a);
        int a2 = a(eeVar.T());
        int a3 = a(eeVar.S());
        layoutParams.setMargins(a3, a2, a3, 0);
        this.g.addView(this.h, layoutParams);
        this.h.bringToFront();
        int a4 = a(eeVar.V());
        View view = new View(this.a);
        view.setBackgroundColor(0);
        int i = a + a4;
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
        layoutParams2.addRule(10);
        layoutParams2.addRule(eeVar.U() ? 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.m a() {
        return this.e;
    }

    @Override
    public void dismiss() {
        com.applovin.impl.sdk.g c = this.d.c();
        if (c != null) {
            c.e();
        }
        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) {
                this.c.e("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
                return;
            }
            window.setFlags(this.a.getWindow().getAttributes().flags, this.a.getWindow().getAttributes().flags);
            if (this.e.F()) {
                window.addFlags(16777216);
            }
        } catch (Throwable th) {
            this.c.e("ExpandedAdDialog", "Setting window flags failed.", th);
        }
    }
}