From 5e12fbeae1cdf15e995c88312b70741f14f04b18 Mon Sep 17 00:00:00 2001 From: Beverly Date: Tue, 21 Dec 2021 14:11:08 -0500 Subject: [PATCH] Update Toast documentation to explicitly callout the 2-line limit Note: more information can be found in https://developer.android.com/guide/topics/ui/notifiers/toasts which is also linked in the documentation but could be missed. Test: manual Fixes: 207767563 Change-Id: Icc7fbf6fddf101bd2422bbeab04e0da8084c6698 --- core/java/android/widget/Toast.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java index 862829bf9b55a..dbf3570b1d247 100644 --- a/core/java/android/widget/Toast.java +++ b/core/java/android/widget/Toast.java @@ -74,6 +74,9 @@ import java.util.List; *

* Note that toasts being sent from the background are rate limited, so avoid sending such toasts * in quick succession. + *

+ * Starting with Android 12 (API level 31), apps targeting Android 12 or newer will have + * their toasts limited to two lines. * *

*

Developer Guides