package com.google.firebase.messaging;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import e4.AbstractC0566j;
import java.util.Map;
import r.C0966e;
import t1.AbstractC1022a;

/* JADX INFO: loaded from: classes.dex */
public final class v extends AbstractC1022a {
    public static final Parcelable.Creator<v> CREATOR = new android.support.v4.media.session.a(13);

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final Bundle f5939k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public C0966e f5940l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public u f5941m;

    public v(Bundle bundle) {
        this.f5939k = bundle;
    }

    public final Map a() {
        if (this.f5940l == null) {
            C0966e c0966e = new C0966e(0);
            Bundle bundle = this.f5939k;
            for (String str : bundle.keySet()) {
                Object obj = bundle.get(str);
                if (obj instanceof String) {
                    String str2 = (String) obj;
                    if (!str.startsWith("google.") && !str.startsWith("gcm.") && !str.equals("from") && !str.equals("message_type") && !str.equals("collapse_key")) {
                        c0966e.put(str, str2);
                    }
                }
            }
            this.f5940l = c0966e;
        }
        return this.f5940l;
    }

    public final String b() {
        Bundle bundle = this.f5939k;
        String string = bundle.getString("google.message_id");
        return string == null ? bundle.getString("message_id") : string;
    }

    public final u c() {
        if (this.f5941m == null) {
            Bundle bundle = this.f5939k;
            if (S.g.Q(bundle)) {
                this.f5941m = new u(new S.g(bundle));
            }
        }
        return this.f5941m;
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i) {
        int iH = AbstractC0566j.H(parcel, 20293);
        AbstractC0566j.A(parcel, 2, this.f5939k);
        AbstractC0566j.L(parcel, iH);
    }
}
