package M;

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

/* JADX INFO: renamed from: M.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0174d implements InterfaceC0173c, InterfaceC0175e {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f4103q = 0;

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

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

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

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

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

    public /* synthetic */ C0174d() {
    }

    @Override // M.InterfaceC0175e
    public ClipData a() {
        return this.f4104r;
    }

    @Override // M.InterfaceC0173c
    public C0176f b() {
        return new C0176f(new C0174d(this));
    }

    @Override // M.InterfaceC0175e
    public int c() {
        return this.f4106t;
    }

    @Override // M.InterfaceC0175e
    public ContentInfo d() {
        return null;
    }

    @Override // M.InterfaceC0173c
    public void e(Bundle bundle) {
        this.f4108v = bundle;
    }

    @Override // M.InterfaceC0173c
    public void g(Uri uri) {
        this.f4107u = uri;
    }

    @Override // M.InterfaceC0175e
    public int l() {
        return this.f4105s;
    }

    @Override // M.InterfaceC0173c
    public void p(int i) {
        this.f4106t = i;
    }

    public String toString() {
        String str;
        switch (this.f4103q) {
            case 1:
                StringBuilder sb = new StringBuilder("ContentInfoCompat{clip=");
                sb.append(this.f4104r.getDescription());
                sb.append(", source=");
                int i = this.f4105s;
                sb.append(i != 0 ? i != 1 ? i != 2 ? i != 3 ? i != 4 ? i != 5 ? String.valueOf(i) : "SOURCE_PROCESS_TEXT" : "SOURCE_AUTOFILL" : "SOURCE_DRAG_AND_DROP" : "SOURCE_INPUT_METHOD" : "SOURCE_CLIPBOARD" : "SOURCE_APP");
                sb.append(", flags=");
                int i5 = this.f4106t;
                sb.append((i5 & 1) != 0 ? "FLAG_CONVERT_TO_PLAIN_TEXT" : String.valueOf(i5));
                Uri uri = this.f4107u;
                if (uri == null) {
                    str = "";
                } else {
                    str = ", hasLinkUri(" + uri.toString().length() + ")";
                }
                sb.append(str);
                return I1.a.r(sb, this.f4108v != null ? ", hasExtras" : "", "}");
            default:
                return super.toString();
        }
    }

    public C0174d(C0174d c0174d) {
        ClipData clipData = c0174d.f4104r;
        clipData.getClass();
        this.f4104r = clipData;
        int i = c0174d.f4105s;
        if (i < 0) {
            Locale locale = Locale.US;
            throw new IllegalArgumentException("source is out of range of [0, 5] (too low)");
        }
        if (i > 5) {
            Locale locale2 = Locale.US;
            throw new IllegalArgumentException("source is out of range of [0, 5] (too high)");
        }
        this.f4105s = i;
        int i5 = c0174d.f4106t;
        if ((i5 & 1) == i5) {
            this.f4106t = i5;
            this.f4107u = c0174d.f4107u;
            this.f4108v = c0174d.f4108v;
        } else {
            throw new IllegalArgumentException("Requested flags 0x" + Integer.toHexString(i5) + ", but only 0x" + Integer.toHexString(1) + " are allowed");
        }
    }
}
