package com.google.firebase.messaging;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.ShowFirstParty;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public final class x extends f8.a {
    public static final Parcelable.Creator<x> CREATOR = new y();

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public androidx.collection.f f24287b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public w f24288c;

    public x(Bundle bundle) {
        this.f24286a = bundle;
    }

    @Nullable
    public String getCollapseKey() {
        return this.f24286a.getString("collapse_key");
    }

    @Nullable
    public String getFrom() {
        return this.f24286a.getString("from");
    }

    @Nullable
    public String getMessageId() {
        Bundle bundle = this.f24286a;
        String string = bundle.getString("google.message_id");
        return string == null ? bundle.getString("message_id") : string;
    }

    @Nullable
    public String getMessageType() {
        return this.f24286a.getString("message_type");
    }

    @Nullable
    public w getNotification() {
        if (this.f24288c == null) {
            Bundle bundle = this.f24286a;
            if (t.d(bundle)) {
                this.f24288c = new w(new t(bundle));
            }
        }
        return this.f24288c;
    }

    @Nullable
    @ShowFirstParty
    public byte[] getRawData() {
        return this.f24286a.getByteArray("rawData");
    }

    @Nullable
    public String getSenderId() {
        return this.f24286a.getString("google.c.sender.id");
    }

    @Nullable
    public String getTo() {
        return this.f24286a.getString("google.to");
    }

    public final Map w() {
        if (this.f24287b == null) {
            androidx.collection.f fVar = new androidx.collection.f(0);
            Bundle bundle = this.f24286a;
            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")) {
                        fVar.put(str, str2);
                    }
                }
            }
            this.f24287b = fVar;
        }
        return this.f24287b;
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i10) {
        int I = com.bumptech.glide.g.I(20293, parcel);
        com.bumptech.glide.g.n(parcel, 2, this.f24286a);
        com.bumptech.glide.g.N(I, parcel);
    }
}
