package D0;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.google.android.gms.internal.measurement.J3;
import d3.C0815q0;
import d3.C0817r0;
import d3.Z;
import m4.RunnableC1180p;
import n4.u0;

/* JADX INFO: renamed from: D0.g, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0070g extends BroadcastReceiver {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f1546a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f1547b;

    public /* synthetic */ C0070g(int i, Object obj) {
        this.f1546a = i;
        this.f1547b = obj;
    }

    /* JADX WARN: Removed duplicated region for block: B:23:0x0061  */
    @Override // android.content.BroadcastReceiver
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void onReceive(Context context, Intent intent) {
        byte b8;
        switch (this.f1546a) {
            case u0.f15495q /* 0 */:
                if (!isInitialStickyBroadcast()) {
                    C0071h c0071h = (C0071h) this.f1547b;
                    c0071h.a(C0067d.b(context, intent, c0071h.i, c0071h.f1555h));
                }
                break;
            case 1:
                C0817r0 c0817r0 = (C0817r0) this.f1547b;
                if (intent == null) {
                    Z z8 = c0817r0.f12150y;
                    C0817r0.k(z8);
                    z8.f11878y.b("App receiver called with null intent");
                    break;
                } else {
                    String action = intent.getAction();
                    if (action == null) {
                        Z z9 = c0817r0.f12150y;
                        C0817r0.k(z9);
                        z9.f11878y.b("App receiver called with null action");
                        break;
                    } else {
                        int iHashCode = action.hashCode();
                        if (iHashCode != -1928239649) {
                            b8 = (iHashCode == 1279883384 && action.equals("com.google.android.gms.measurement.BATCHES_AVAILABLE")) ? (byte) 1 : (byte) -1;
                        } else if (action.equals("com.google.android.gms.measurement.TRIGGERS_AVAILABLE")) {
                            b8 = 0;
                        }
                        if (b8 != 0) {
                            if (b8 != 1) {
                                Z z10 = c0817r0.f12150y;
                                C0817r0.k(z10);
                                z10.f11878y.b("App receiver called with unknown action");
                            } else if (c0817r0.f12148w.R(null, d3.I.f11521S0)) {
                                Z z11 = c0817r0.f12150y;
                                C0817r0.k(z11);
                                z11.D.b("[sgtm] App Receiver notified batches are available");
                                C0815q0 c0815q0 = c0817r0.f12151z;
                                C0817r0.k(c0815q0);
                                c0815q0.O(new M4.k(20, this));
                            }
                            break;
                        } else {
                            J3.b();
                            if (c0817r0.f12148w.R(null, d3.I.f11529X0)) {
                                Z z12 = c0817r0.f12150y;
                                C0817r0.k(z12);
                                z12.D.b("App receiver notified triggers are available");
                                C0815q0 c0815q02 = c0817r0.f12151z;
                                C0817r0.k(c0815q02);
                                c0815q02.O(new M4.k(19, c0817r0));
                                break;
                            }
                        }
                    }
                }
                break;
            default:
                ((x0.n) this.f1547b).f18531a.execute(new RunnableC1180p(this, 6, context));
                break;
        }
    }

    public C0070g(C0817r0 c0817r0) {
        this.f1546a = 1;
        this.f1547b = c0817r0;
    }
}
