package o;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.os.Build;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class X2 implements InterfaceC1598ji {
    public final Y2 a;

    public X2(Y2 y2) {
        this.a = y2;
    }

    public final void a(C1408hi c1408hi) {
        ClipboardManager clipboardManager = this.a.a;
        if (c1408hi != null) {
            clipboardManager.setPrimaryClip(c1408hi.a);
        } else if (Build.VERSION.SDK_INT >= 28) {
            clipboardManager.clearPrimaryClip();
        } else {
            clipboardManager.setPrimaryClip(ClipData.newPlainText("", ""));
        }
    }
}
