Don't block app-rendered text toast on apps with targetSdk < 30
We've decided to gate the text toast move on targetSdk due to an app crash (b/148438364) but decided not to gate the background custom toast block (in NMS) on targetSdk temporarily to gather dogfood and DP feedback. This meant that app-rendered text toasts (which are only possible for apps with targetSdk < 30) were being blocked in NMS since they were being considered custom toasts. This brings back the boolean inside Toast class that differentiates between custom and text toasts for apps with targetSdk < 30, since both are app-rendered in this case. This code won't be present on final version and is temporary to gather feedback on dogfood and DP, since almost no app currently targets SDK 30+. We'll gate both changes (the system UI move and the bg custom toast block) on targetSdk later on. Bug: 148761979 Bug: 148794147 Bug: 144754526 Test: Verify that, while on the background: App with | Custom toast | Text toast targetSdk < 30 | Blocked | Allowed targetSdk 30+ | Blocked | Allowed Test: atest android.widget.cts.ToastTest android.widget.cts29.ToastTest LegacyToastTest Change-Id: Id529028bc463034cd2f64a6f2f97e71bc6ea7c36
Loading
Please register or sign in to comment