package c.e.i;

import android.content.ClipData;
import android.net.Uri;
import android.os.Bundle;
import java.util.Locale;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class c {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f5258c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final Uri f5259d;

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

    public static final class a {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public ClipData f5261a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public int f5262b;

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

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public Uri f5264d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public Bundle f5265e;

        public a(ClipData clipData, int i2) {
            this.f5261a = clipData;
            this.f5262b = i2;
        }
    }

    public c(a aVar) {
        ClipData clipData = aVar.f5261a;
        Objects.requireNonNull(clipData);
        this.f5256a = clipData;
        int i2 = aVar.f5262b;
        if (i2 < 0) {
            throw new IllegalArgumentException(String.format(Locale.US, "%s is out of range of [%d, %d] (too low)", "source", 0, 3));
        }
        if (i2 > 3) {
            throw new IllegalArgumentException(String.format(Locale.US, "%s is out of range of [%d, %d] (too high)", "source", 0, 3));
        }
        this.f5257b = i2;
        int i3 = aVar.f5263c;
        if ((i3 & 1) == i3) {
            this.f5258c = i3;
            this.f5259d = aVar.f5264d;
            this.f5260e = aVar.f5265e;
        } else {
            StringBuilder sbC = a.b.c.a.a.C("Requested flags 0x");
            sbC.append(Integer.toHexString(i3));
            sbC.append(", but only 0x");
            sbC.append(Integer.toHexString(1));
            sbC.append(" are allowed");
            throw new IllegalArgumentException(sbC.toString());
        }
    }

    public String toString() {
        String string;
        StringBuilder sbC = a.b.c.a.a.C("ContentInfoCompat{clip=");
        sbC.append(this.f5256a.getDescription());
        sbC.append(", source=");
        int i2 = this.f5257b;
        sbC.append(i2 != 0 ? i2 != 1 ? i2 != 2 ? i2 != 3 ? String.valueOf(i2) : "SOURCE_DRAG_AND_DROP" : "SOURCE_INPUT_METHOD" : "SOURCE_CLIPBOARD" : "SOURCE_APP");
        sbC.append(", flags=");
        int i3 = this.f5258c;
        sbC.append((i3 & 1) != 0 ? "FLAG_CONVERT_TO_PLAIN_TEXT" : String.valueOf(i3));
        if (this.f5259d == null) {
            string = "";
        } else {
            StringBuilder sbC2 = a.b.c.a.a.C(", hasLinkUri(");
            sbC2.append(this.f5259d.toString().length());
            sbC2.append(")");
            string = sbC2.toString();
        }
        sbC.append(string);
        return a.b.c.a.a.u(sbC, this.f5260e != null ? ", hasExtras" : "", "}");
    }
}
