Merge pull request #8961 from dhruvpatidar359/Toast-Popup

Remove the redundant/overlapping toast "Copied to clipboard" for Android 13+
This commit is contained in:
AudricV 2022-11-26 21:33:12 +01:00 committed by GitHub
commit 6b89b44dcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View file

@ -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();
}
}
/**