package com.flurry.android;

import android.content.Context;
import android.content.Intent;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/0.dex */
public final class t extends RelativeLayout {
    private be a;
    private Context b;
    private String c;
    private FlurryAdSize d;
    private ViewGroup e;
    private int f;
    private boolean g;

    /* JADX INFO: Access modifiers changed from: package-private */
    public t(be beVar, Context context, String str, ViewGroup viewGroup, FlurryAdSize flurryAdSize) {
        super(context);
        this.a = beVar;
        this.b = context;
        this.c = str;
        this.e = viewGroup;
        this.f = 0;
        this.g = false;
        this.d = flurryAdSize;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final ar a(long j) {
        boolean z = true;
        boolean z2 = false;
        q a = this.a.a(this.b, this.c, y.a(this.b, this.e.getWidth()), y.a(this.b, this.e.getHeight()), false, this.d, j);
        if (a.a() != null && a.a().c().size() > 0) {
            a.a().c().get(0).f().toString();
        }
        if (a.b() != null && a.d()) {
            removeAllViews();
            if (getParent() == null) {
                a.b().a(this.e, this);
            }
            addView(a.b(), new RelativeLayout.LayoutParams(-1, -1));
            this.f = 0;
        } else if (a.c()) {
            Intent intent = new Intent();
            intent.setClass(this.b, FlurryFullscreenTakeoverActivity.class);
            if (y.a(this.b, intent)) {
                this.b.startActivity(intent);
            } else {
                bc.b("FlurryAgent", "Unable to launch FlurryFullscreenTakeoverActivity. Fix by declaring this Activity in your AndroidManifest.xml");
            }
            z = false;
            z2 = true;
        } else {
            z = false;
        }
        return new ar(z, z2);
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void a(int i) {
        this.f = i;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final int a() {
        return this.f;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void a(boolean z) {
        this.g = z;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final boolean b() {
        return this.g;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final ViewGroup c() {
        return this.e;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final String d() {
        return this.c;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void a(int i, int i2) {
        ViewGroup.LayoutParams layoutParams = getLayoutParams();
        if (layoutParams.width != i || layoutParams.height != i2) {
            layoutParams.width = i;
            layoutParams.height = i2;
            requestLayout();
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final o e() {
        if (getChildCount() < 1) {
            return null;
        }
        try {
            return (o) getChildAt(0);
        } catch (ClassCastException e) {
            return null;
        }
    }
}
