feat: Show clipboard toast for MIUI

Co-authored-by: tehcneko <chsqwyx@gmail.com>
This commit is contained in:
xtaodada 2023-01-14 16:34:48 +08:00
parent 7aad3aaaa2
commit d4c8c95256
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -2648,7 +2648,7 @@ public class AndroidUtilities {
// }
public static boolean shouldShowClipboardToast() {
return (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || !OneUIUtilities.hasBuiltInClipboardToasts()) && Build.VERSION.SDK_INT < 32 /* TODO: Update to TIRAMISU when compileSdkVersion would be 32 */;
return (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || !OneUIUtilities.hasBuiltInClipboardToasts()) && (Build.VERSION.SDK_INT < 32 || XiaomiUtilities.isMIUI()); /* TODO: Update to TIRAMISU when compileSdkVersion would be 32 */
}
public static boolean addToClipboard(CharSequence str) {