Gate CHANGE_TEXT_TOASTS_IN_THE_SYSTEM on targetSdk 30+

Bug: 148438364
Bug: 144152069
Bug: 144754526
Bug: 128611929
Test: atest android.widget.cts29.ToastTest
Test: Verify com.commsource.beautyplus doesn't crash when sharing photo
      (details on b/148438364)

Change-Id: Iea3ffd69c3fd217b993d89020b7ec6c3c32cea15
This commit is contained in:
Bernardo Rufino
2020-01-29 11:55:20 +00:00
parent 505fb76065
commit 944121a8d3

View File

@@ -28,6 +28,7 @@ import android.app.ITransientNotification;
import android.app.ITransientNotificationCallback;
import android.compat.Compatibility;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
@@ -112,11 +113,9 @@ public class Toast {
/**
* Text toasts will be rendered by SystemUI instead of in-app, so apps can't circumvent
* background custom toast restrictions.
*
* TODO(b/144152069): Add @EnabledAfter(Q) to target R+ after assessing impact on dogfood
*/
@ChangeId
// @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q)
@EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q)
private static final long CHANGE_TEXT_TOASTS_IN_THE_SYSTEM = 147798919L;