package o1;

import P1.o;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.internal.measurement.C1;
import java.io.IOException;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class d implements P1.a, P1.g {

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public static final /* synthetic */ d f9390l = new d(0);

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final /* synthetic */ d f9391m = new d(1);

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static final /* synthetic */ d f9392n = new d(2);

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

    public /* synthetic */ d(int i) {
        this.f9393k = i;
    }

    @Override // P1.g
    public o c(Object obj) {
        Bundle bundle = (Bundle) obj;
        int i = C0925b.f9380h;
        return (bundle == null || !bundle.containsKey("google.messenger")) ? C1.l(bundle) : C1.l(null);
    }

    @Override // P1.a
    public Object f(P1.h hVar) throws IOException {
        switch (this.f9393k) {
            case 0:
                if (hVar.h()) {
                    return (Bundle) hVar.f();
                }
                if (Log.isLoggable("Rpc", 3)) {
                    Log.d("Rpc", "Error making request: ".concat(String.valueOf(hVar.e())));
                }
                throw new IOException("SERVICE_NOT_AVAILABLE", hVar.e());
            default:
                Intent intent = (Intent) ((Bundle) hVar.f()).getParcelable("notification_data");
                if (intent != null) {
                    return new C0924a(intent);
                }
                return null;
        }
    }
}
