Apk Done v1.0版本的 MD5 值为:44cfb8e1ce639995aa7f0de6a3a6388b

以下内容为反编译后的 l.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.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.RelativeLayout;
import com.applovin.impl.adview.i;
import com.applovin.sdk.AppLovinSdkUtils;
public class l extends Dialog implements k {
    private final Activity a;
    private final com.applovin.impl.sdk.n b;
    private final com.applovin.impl.sdk.w c;
    private final d d;
    private final com.applovin.impl.sdk.ad.a e;
    private RelativeLayout f;
    private i g;

    public l(com.applovin.impl.sdk.ad.a aVar, d dVar, Activity activity, com.applovin.impl.sdk.n nVar) {
        super(activity, 16973840);
        if (aVar == null) {
            throw new IllegalArgumentException("No ad specified");
        }
        if (dVar == null) {
            throw new IllegalArgumentException("No main view specified");
        }
        if (nVar == null) {
            throw new IllegalArgumentException("No sdk specified");
        }
        if (activity == null) {
            throw new IllegalArgumentException("No activity specified");
        }
        this.b = nVar;
        this.c = nVar.A();
        this.a = activity;
        this.d = dVar;
        this.e = aVar;
        requestWindowFeature(1);
        setCancelable(false);
    }

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

    private void a(i.a aVar) {
        if (this.g != null) {
            if (com.applovin.impl.sdk.w.a()) {
                this.c.d("ExpandedAdDialog", "Attempting to create duplicate close button");
                return;
            }
            return;
        }
        i a = i.a(aVar, this.a);
        this.g = a;
        a.setVisibility(8);
        this.g.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                l.this.d();
            }
        });
        this.g.setClickable(false);
        int a2 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.bV)).intValue());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a2, a2);
        layoutParams.addRule(10);
        layoutParams.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.bY)).booleanValue() ? 9 : 11);
        this.g.a(a2);
        int a3 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.bX)).intValue());
        int a4 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.bW)).intValue());
        layoutParams.setMargins(a4, a3, a4, 0);
        this.f.addView(this.g, layoutParams);
        this.g.bringToFront();
        int a5 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.bZ)).intValue());
        View view = new View(this.a);
        view.setBackgroundColor(0);
        int i = a2 + a5;
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
        layoutParams2.addRule(10);
        layoutParams2.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.bY)).booleanValue() ? 9 : 11);
        layoutParams2.setMargins(a4 - a(5), a3 - a(5), a4 - a(5), 0);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view2) {
                if (l.this.g.isClickable()) {
                    l.this.g.performClick();
                }
            }
        });
        this.f.addView(view, layoutParams2);
        view.bringToFront();
    }

    private void c() {
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
        layoutParams.addRule(13);
        this.d.setLayoutParams(layoutParams);
        RelativeLayout relativeLayout = new RelativeLayout(this.a);
        this.f = relativeLayout;
        relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        this.f.setBackgroundColor(-1157627904);
        this.f.addView(this.d);
        if (!this.e.m()) {
            a(this.e.n());
            e();
        }
        setContentView(this.f);
    }

    public void d() {
        this.d.a("javascript:al_onCloseTapped();", new Runnable() {
            @Override
            public void run() {
                l.this.dismiss();
            }
        });
    }

    private void e() {
        this.a.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                try {
                    if (l.this.g == null) {
                        l.this.d();
                    }
                    l.this.g.setVisibility(0);
                    l.this.g.bringToFront();
                    AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
                    alphaAnimation.setDuration(300L);
                    alphaAnimation.setAnimationListener(new Animation.AnimationListener() {
                        @Override
                        public void onAnimationEnd(Animation animation) {
                            l.this.g.setClickable(true);
                        }

                        @Override
                        public void onAnimationRepeat(Animation animation) {
                        }

                        @Override
                        public void onAnimationStart(Animation animation) {
                        }
                    });
                    l.this.g.startAnimation(alphaAnimation);
                } catch (Throwable th) {
                    if (com.applovin.impl.sdk.w.a()) {
                        l.this.c.b("ExpandedAdDialog", "Unable to fade in close button", th);
                    }
                    l.this.d();
                }
            }
        });
    }

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

    public d b() {
        return this.d;
    }

    @Override
    public void dismiss() {
        com.applovin.impl.sdk.d.d statsManagerHelper = this.d.getStatsManagerHelper();
        if (statsManagerHelper != null) {
            statsManagerHelper.e();
        }
        this.a.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                l.this.f.removeView(l.this.d);
                l.super.dismiss();
            }
        });
    }

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

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

    @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);
                window.addFlags(16777216);
            } else if (com.applovin.impl.sdk.w.a()) {
                this.c.e("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
            }
        } catch (Throwable th) {
            if (com.applovin.impl.sdk.w.a()) {
                this.c.b("ExpandedAdDialog", "Setting window flags failed.", th);
            }
        }
    }
}