From ef35b36ebac12850f3c2da43a4c73da9142a24f3 Mon Sep 17 00:00:00 2001 From: dhruvpatidar359 Date: Sun, 11 Sep 2022 23:04:26 +0530 Subject: [PATCH] Remove the redundant/overlapping toast "Copied to clipboard" for Android 13+ Signed-off-by: dhruv Co-authored-by: Tobi Co-authored-by: AudricV <74829229+AudricV@users.noreply.github.com> --- .../newpipe/util/external_communication/ShareUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/external_communication/ShareUtils.java b/app/src/main/java/org/schabi/newpipe/util/external_communication/ShareUtils.java index debeb902c..9829ddd2e 100644 --- a/app/src/main/java/org/schabi/newpipe/util/external_communication/ShareUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/external_communication/ShareUtils.java @@ -314,7 +314,10 @@ public final class ShareUtils { } clipboardManager.setPrimaryClip(ClipData.newPlainText(null, text)); - Toast.makeText(context, R.string.msg_copied, Toast.LENGTH_SHORT).show(); + if (Build.VERSION.SDK_INT < 33) { + // Android 13 has its own "copied to clipboard" dialog + Toast.makeText(context, R.string.msg_copied, Toast.LENGTH_SHORT).show(); + } } /**