package com.flurry.android;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.KeyEvent;
import java.util.Collections;

/* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/0.dex */
public final class FlurryFullscreenTakeoverActivity extends Activity {
    private static final String a = FlurryFullscreenTakeoverActivity.class.getSimpleName();
    private aj b;
    private aw c;

    @Override // android.app.Activity
    public final void onCreate(Bundle bundle) {
        setTheme(16973831);
        super.onCreate(bundle);
        Intent intent = getIntent();
        String stringExtra = intent.getStringExtra("url");
        if (stringExtra == null) {
            int i = bundle != null ? bundle.getInt("frameIndex", -1) : -1;
            if (i < 0) {
                i = intent.getIntExtra("frameIndex", 0);
            }
            be b = FlurryAgent.b();
            if (b.n() != null) {
                this.b = new aj(this, b, b.m(), b.n(), i);
                this.b.initLayout(this);
                setContentView(this.b);
                return;
            }
            return;
        }
        this.c = new aw(this, stringExtra);
        setContentView(this.c);
    }

    @Override // android.app.Activity
    public final void onStart() {
        super.onStart();
        if (FlurryAgent.c() != null) {
            FlurryAgent.onStartSession(this, FlurryAgent.c());
        } else {
            finish();
        }
    }

    @Override // android.app.Activity
    public final void onStop() {
        super.onStop();
        if (this.b != null) {
            this.b.b();
        }
        FlurryAgent.onEndSession(this);
    }

    @Override // android.app.Activity
    public final void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        if (this.b != null) {
            bundle.putInt("frameIndex", 0);
        }
    }

    @Override // android.app.Activity, android.content.ComponentCallbacks
    public final void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
    }

    @Override // android.app.Activity
    protected final void onRestart() {
        super.onRestart();
    }

    @Override // android.app.Activity
    protected final void onResume() {
        super.onResume();
    }

    @Override // android.app.Activity
    protected final void onPause() {
        super.onPause();
    }

    @Override // android.app.Activity
    protected final void onDestroy() {
        super.onDestroy();
    }

    @Override // android.app.Activity, android.view.KeyEvent.Callback
    public final boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4) {
            if (this.b != null) {
                this.b.a("adWillClose", Collections.emptyMap(), this.b.e, this.b.g, this.b.f, 0);
            }
            return true;
        }
        return super.onKeyUp(i, keyEvent);
    }
}
