package defpackage;

import android.app.Person;
import android.os.Bundle;
import androidx.core.graphics.drawable.IconCompat;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public class j67 {
    public CharSequence a;
    public IconCompat b;
    public String c;
    public String d;
    public boolean e;
    public boolean f;

    @l18
    public static class a {
    }

    @l18
    public static class b {
    }

    public static class c {
        public CharSequence a;
        public IconCompat b;
        public String c;
        public String d;
        public boolean e;
        public boolean f;

        public final j67 a() {
            j67 j67Var = new j67();
            j67Var.a = this.a;
            j67Var.b = this.b;
            j67Var.c = this.c;
            j67Var.d = this.d;
            j67Var.e = this.e;
            j67Var.f = this.f;
            return j67Var;
        }
    }

    public static j67 a(Person person) {
        c cVar = new c();
        cVar.a = person.getName();
        cVar.b = person.getIcon() != null ? IconCompat.b(person.getIcon()) : null;
        cVar.c = person.getUri();
        cVar.d = person.getKey();
        cVar.e = person.isBot();
        cVar.f = person.isImportant();
        return cVar.a();
    }

    public static j67 b(Bundle bundle) {
        Bundle bundle2 = bundle.getBundle("icon");
        c cVar = new c();
        cVar.a = bundle.getCharSequence(AppMeasurementSdk.ConditionalUserProperty.NAME);
        cVar.b = bundle2 != null ? IconCompat.a(bundle2) : null;
        cVar.c = bundle.getString("uri");
        cVar.d = bundle.getString("key");
        cVar.e = bundle.getBoolean("isBot");
        cVar.f = bundle.getBoolean("isImportant");
        return cVar.a();
    }

    public final Person c() {
        Person.Builder name = new Person.Builder().setName(this.a);
        IconCompat iconCompat = this.b;
        return name.setIcon(iconCompat != null ? iconCompat.h(null) : null).setUri(this.c).setKey(this.d).setBot(this.e).setImportant(this.f).build();
    }

    public final boolean equals(Object obj) {
        if (obj == null || !(obj instanceof j67)) {
            return false;
        }
        j67 j67Var = (j67) obj;
        String str = this.d;
        String str2 = j67Var.d;
        return (str == null && str2 == null) ? Objects.equals(Objects.toString(this.a), Objects.toString(j67Var.a)) && Objects.equals(this.c, j67Var.c) && Boolean.valueOf(this.e).equals(Boolean.valueOf(j67Var.e)) && Boolean.valueOf(this.f).equals(Boolean.valueOf(j67Var.f)) : Objects.equals(str, str2);
    }

    public final int hashCode() {
        String str = this.d;
        return str != null ? str.hashCode() : Objects.hash(this.a, this.c, Boolean.valueOf(this.e), Boolean.valueOf(this.f));
    }
}
