导航菜单

页面标题

页面副标题

All File Recovery v1.0.2 - DialogC0484f.java 源代码

正在查看: All File Recovery v1.0.2 应用的 DialogC0484f.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.C0577l4;
import com.applovin.impl.InterfaceC0550i1;
import com.applovin.impl.adview.AbstractC0483e;
import com.applovin.impl.sdk.C0672k;
import com.applovin.impl.sdk.C0676o;
import com.applovin.impl.sdk.ad.C0661a;
import com.applovin.sdk.AppLovinSdkUtils;

class DialogC0484f extends Dialog implements InterfaceC0550i1 {
    private final Activity a;
    private final C0672k b;
    private final C0676o c;
    private final C0480b d;
    private final C0661a e;
    private RelativeLayout f;
    private AbstractC0483e g;

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

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

        @Override
        public void onAnimationRepeat(Animation animation) {
        }

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

    public DialogC0484f(C0661a c0661a, C0480b c0480b, Activity activity, C0672k c0672k) {
        super(activity, R.style.Theme.Translucent.NoTitleBar);
        if (c0661a == null) {
            throw new IllegalArgumentException("No ad specified");
        }
        if (c0480b == null) {
            throw new IllegalArgumentException("No main view specified");
        }
        if (c0672k == null) {
            throw new IllegalArgumentException("No sdk specified");
        }
        if (activity == null) {
            throw new IllegalArgumentException("No activity specified");
        }
        this.b = c0672k;
        this.c = c0672k.O();
        this.a = activity;
        this.d = c0480b;
        this.e = c0661a;
        requestWindowFeature(1);
        setCancelable(false);
    }

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

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

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

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

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

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

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

    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.f = relativeLayout;
        relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        this.f.setBackgroundColor(-1157627904);
        this.f.addView(this.d);
        if (!this.e.t1()) {
            a(this.e.n1());
            g();
        }
        setContentView(this.f);
    }

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

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

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

    private void a(AbstractC0483e.a aVar) {
        if (this.g != null) {
            if (C0676o.a()) {
                this.c.k("ExpandedAdDialog", "Attempting to create duplicate close button");
                return;
            }
            return;
        }
        AbstractC0483e a2 = AbstractC0483e.a(aVar, this.a);
        this.g = a2;
        a2.setVisibility(8);
        this.g.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                DialogC0484f.this.a(view);
            }
        });
        this.g.setClickable(false);
        int a3 = a(((Integer) this.b.a(C0577l4.x1)).intValue());
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a3, a3);
        layoutParams.addRule(10);
        C0672k c0672k = this.b;
        C0577l4 c0577l4 = C0577l4.A1;
        layoutParams.addRule(((Boolean) c0672k.a(c0577l4)).booleanValue() ? 9 : 11);
        this.g.a(a3);
        int a6 = a(((Integer) this.b.a(C0577l4.z1)).intValue());
        int a7 = a(((Integer) this.b.a(C0577l4.y1)).intValue());
        layoutParams.setMargins(a7, a6, a7, 0);
        this.f.addView(this.g, layoutParams);
        this.g.bringToFront();
        int a8 = a(((Integer) this.b.a(C0577l4.B1)).intValue());
        View view = new View(this.a);
        view.setBackgroundColor(0);
        int i = a3 + a8;
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
        layoutParams2.addRule(10);
        layoutParams2.addRule(((Boolean) this.b.a(c0577l4)).booleanValue() ? 9 : 11);
        layoutParams2.setMargins(a7 - a(5), a6 - a(5), a7 - a(5), 0);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                DialogC0484f.this.b(view2);
            }
        });
        this.f.addView(view, layoutParams2);
        view.bringToFront();
    }

    public C0661a b() {
        return this.e;
    }

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

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