package com.google.android.tv.ads.controls;

import aa.b;
import aa.d;
import android.R;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.a;
import com.google.android.gms.internal.atv_ads_framework.d1;
import com.google.android.gms.internal.atv_ads_framework.r1;
import com.google.android.gms.internal.atv_ads_framework.s1;
import java.util.List;

/* JADX INFO: loaded from: classes2.dex */
public final class FallbackImageActivity extends AppCompatActivity {
    /* JADX WARN: Removed duplicated region for block: B:11:0x0055  */
    @Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void onCreate(@Nullable Bundle bundle) {
        super.onCreate(bundle);
        Bundle extras = getIntent().getExtras();
        Bundle bundle2 = new Bundle();
        if (extras != null) {
            bundle2.putBoolean("render_error_message", extras.getBoolean("render_error_message"));
            b bVar = (b) extras.getParcelable("icon_click_fallback_images");
            if (bVar != null) {
                List list = bVar.f411a;
                if (list.isEmpty() || ((d) list.get(0)).getStaticResourceUri() == null) {
                    d1 d1VarS = d1.s(this);
                    r1 r1VarM = s1.m();
                    r1VarM.d();
                    r1VarM.f(2);
                    r1VarM.e(6);
                    d1VarS.t((s1) r1VarM.a());
                    bundle2.putBoolean("render_error_message", true);
                } else {
                    d dVar = (d) list.get(0);
                    bundle2.putString("wta_uri", dVar.getStaticResourceUri());
                    bundle2.putString("wta_alt_text", dVar.getAltText());
                }
            }
        } else {
            d1 d1VarS2 = d1.s(this);
            r1 r1VarM2 = s1.m();
            r1VarM2.d();
            r1VarM2.f(2);
            r1VarM2.e(5);
            d1VarS2.t((s1) r1VarM2.a());
            bundle2.putBoolean("render_error_message", true);
        }
        androidx.fragment.app.d1 supportFragmentManager = getSupportFragmentManager();
        supportFragmentManager.getClass();
        a aVar = new a(supportFragmentManager);
        aVar.f2577q = true;
        aVar.replace(R.id.content, SideDrawerFragment.class, bundle2).c();
    }
}
