导航菜单

页面标题

页面副标题

Jurassic World v1.83.4 - f.java 源代码

正在查看: Jurassic World v1.83.4 应用的 f.java JAVA 源代码文件

本页面展示 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.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.RelativeLayout;
import com.applovin.impl.adview.e;
import com.applovin.impl.sj;
import com.applovin.impl.t6;
import com.applovin.sdk.AppLovinSdkUtils;

class f extends Dialog implements t6 {
    private final Activity a;
    private final com.applovin.impl.sdk.j b;
    private final com.applovin.impl.sdk.n c;
    private final b d;
    private final com.applovin.impl.sdk.ad.a f;
    private RelativeLayout g;
    private e h;

    class a implements Animation.AnimationListener {
        a() {
        }

        @Override
        public void onAnimationEnd(Animation animation) {
            f.this.h.setClickable(true);
        }

        @Override
        public void onAnimationRepeat(Animation animation) {
        }

        @Override
        public void onAnimationStart(Animation animation) {
        }
    }

    f(com.applovin.impl.sdk.ad.a aVar, b bVar, Activity activity, com.applovin.impl.sdk.j jVar) {
        super(activity, R.style.Theme.Translucent.NoTitleBar);
        if (aVar == null) {
            throw new IllegalArgumentException("No ad specified");
        }
        if (bVar == null) {
            throw new IllegalArgumentException("No main view specified");
        }
        if (jVar == null) {
            throw new IllegalArgumentException("No sdk specified");
        }
        if (activity == null) {
            throw new IllegalArgumentException("No activity specified");
        }
        this.b = jVar;
        this.c = jVar.J();
        this.a = activity;
        this.d = bVar;
        this.f = aVar;
        requestWindowFeature(1);
        setCancelable(false);
    }

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

    public void e() {
        this.g.removeView(this.d);
        super.dismiss();
    }

    public void f() {
        try {
            if (this.h == null) {
                a();
            }
            this.h.setVisibility(0);
            this.h.bringToFront();
            AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
            alphaAnimation.setDuration(300L);
            alphaAnimation.setAnimationListener(new a());
            this.h.startAnimation(alphaAnimation);
        } catch (Throwable th) {
            if (com.applovin.impl.sdk.n.a()) {
                this.c.a("ExpandedAdDialog", "Unable to fade in close button", th);
            }
            a();
        }
    }

    private void g() {
        this.a.runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                f.this.f();
            }
        });
    }

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

    @Override
    public void dismiss() {
        this.a.runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                f.this.e();
            }
        });
    }

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

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

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

    private void a() {
        this.d.a("javascript:al_onCloseTapped();");
        dismiss();
    }

    public void b(View view) {
        if (this.h.isClickable()) {
            this.h.performClick();
        }
    }

    private void a(e.a aVar) {
        if (this.h != null) {
            if (com.applovin.impl.sdk.n.a()) {
                this.c.k("ExpandedAdDialog", "Attempting to create duplicate close button");
                return;
            }
            return;
        }
        e a2 = e.a(aVar, this.a);
        this.h = a2;
        a2.setVisibility(8);
        this.h.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                f.this.a(view);
            }
        });
        this.h.setClickable(false);
        int a3 = a(((Integer) this.b.a(sj.T1)).intValue());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a3, a3);
        layoutParams.addRule(10);
        com.applovin.impl.sdk.j jVar = this.b;
        sj sjVar = sj.W1;
        layoutParams.addRule(((Boolean) jVar.a(sjVar)).booleanValue() ? 9 : 11);
        this.h.a(a3);
        int a4 = a(((Integer) this.b.a(sj.V1)).intValue());
        int a5 = a(((Integer) this.b.a(sj.U1)).intValue());
        layoutParams.setMargins(a5, a4, a5, 0);
        this.g.addView(this.h, layoutParams);
        this.h.bringToFront();
        int a6 = a(((Integer) this.b.a(sj.X1)).intValue());
        View view = new View(this.a);
        view.setBackgroundColor(0);
        int i = a3 + a6;
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
        layoutParams2.addRule(10);
        layoutParams2.addRule(((Boolean) this.b.a(sjVar)).booleanValue() ? 9 : 11);
        layoutParams2.setMargins(a5 - a(5), a4 - a(5), a5 - a(5), 0);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                f.this.b(view2);
            }
        });
        this.g.addView(view, layoutParams2);
        view.bringToFront();
    }

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

    public void a(View view) {
        a();
    }

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