package o;

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

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.om, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2081om implements InterfaceC1986nm, InterfaceC2176pm {
    public final /* synthetic */ int l = 0;
    public ClipData m;
    public int n;

    /* renamed from: o, reason: collision with root package name */
    public int f665o;
    public Uri p;
    public Bundle q;

    public /* synthetic */ C2081om() {
    }

    @Override // o.InterfaceC2176pm
    public ClipData b() {
        return this.m;
    }

    @Override // o.InterfaceC1986nm
    public C2271qm build() {
        return new C2271qm(new C2081om(this));
    }

    @Override // o.InterfaceC2176pm
    public int j() {
        return this.f665o;
    }

    @Override // o.InterfaceC2176pm
    public ContentInfo m() {
        return null;
    }

    @Override // o.InterfaceC1986nm
    public void o(Uri uri) {
        this.p = uri;
    }

    @Override // o.InterfaceC2176pm
    public int p() {
        return this.n;
    }

    @Override // o.InterfaceC1986nm
    public void setExtras(Bundle bundle) {
        this.q = bundle;
    }

    @Override // o.InterfaceC1986nm
    public void t(int i) {
        this.f665o = i;
    }

    public String toString() {
        String str;
        switch (this.l) {
            case 1:
                Uri uri = this.p;
                StringBuilder sb = new StringBuilder("ContentInfoCompat{clip=");
                sb.append(this.m.getDescription());
                sb.append(", source=");
                int i = this.n;
                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 i2 = this.f665o;
                sb.append((i2 & 1) != 0 ? "FLAG_CONVERT_TO_PLAIN_TEXT" : String.valueOf(i2));
                if (uri == null) {
                    str = "";
                } else {
                    str = ", hasLinkUri(" + uri.toString().length() + ")";
                }
                sb.append(str);
                return AbstractC2462sn.n(sb, this.q != null ? ", hasExtras" : "", "}");
            default:
                return super.toString();
        }
    }

    public C2081om(C2081om c2081om) {
        ClipData clipData = c2081om.m;
        clipData.getClass();
        this.m = clipData;
        int i = c2081om.n;
        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.n = i;
        int i2 = c2081om.f665o;
        if ((i2 & 1) == i2) {
            this.f665o = i2;
            this.p = c2081om.p;
            this.q = c2081om.q;
        } else {
            throw new IllegalArgumentException("Requested flags 0x" + Integer.toHexString(i2) + ", but only 0x" + Integer.toHexString(1) + " are allowed");
        }
    }
}
