package P;

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

/* JADX INFO: renamed from: P.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0160d implements InterfaceC0159c, InterfaceC0161e {

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

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

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

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

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public Uri f2437o;
    public Bundle p;

    public /* synthetic */ C0160d() {
    }

    @Override // P.InterfaceC0161e
    public ClipData b() {
        return this.f2434l;
    }

    @Override // P.InterfaceC0159c
    public C0162f d() {
        return new C0162f(new C0160d(this));
    }

    @Override // P.InterfaceC0159c
    public void f(Bundle bundle) {
        this.p = bundle;
    }

    @Override // P.InterfaceC0161e
    public int i() {
        return this.f2436n;
    }

    @Override // P.InterfaceC0161e
    public ContentInfo j() {
        return null;
    }

    @Override // P.InterfaceC0159c
    public void k(Uri uri) {
        this.f2437o = uri;
    }

    @Override // P.InterfaceC0161e
    public int l() {
        return this.f2435m;
    }

    @Override // P.InterfaceC0159c
    public void m(int i) {
        this.f2436n = i;
    }

    public String toString() {
        String str;
        switch (this.f2433k) {
            case 1:
                StringBuilder sb = new StringBuilder("ContentInfoCompat{clip=");
                sb.append(this.f2434l.getDescription());
                sb.append(", source=");
                int i = this.f2435m;
                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.f2436n;
                sb.append((i5 & 1) != 0 ? "FLAG_CONVERT_TO_PLAIN_TEXT" : String.valueOf(i5));
                Uri uri = this.f2437o;
                if (uri == null) {
                    str = "";
                } else {
                    str = ", hasLinkUri(" + uri.toString().length() + ")";
                }
                sb.append(str);
                return s0.c.e(sb, this.p != null ? ", hasExtras" : "", "}");
            default:
                return super.toString();
        }
    }

    public C0160d(C0160d c0160d) {
        ClipData clipData = c0160d.f2434l;
        clipData.getClass();
        this.f2434l = clipData;
        int i = c0160d.f2435m;
        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.f2435m = i;
        int i5 = c0160d.f2436n;
        if ((i5 & 1) == i5) {
            this.f2436n = i5;
            this.f2437o = c0160d.f2437o;
            this.p = c0160d.p;
        } else {
            throw new IllegalArgumentException("Requested flags 0x" + Integer.toHexString(i5) + ", but only 0x" + Integer.toHexString(1) + " are allowed");
        }
    }
}
