From efeba407343ba9bae15382e4cc345ae14163bb36 Mon Sep 17 00:00:00 2001 From: Michael Klimushyn Date: Mon, 29 Jul 2019 12:46:26 -0700 Subject: [PATCH] Deprecate FlutterView#enableTransparentBackground (flutter/engine#10235) The API breaks accessibility highlighting because of SurfaceView#setZOrderOnTop. Deprecate it since the underlying issue is an Android SDK one that can't be worked around from within a SurfaceView. --- .../shell/platform/android/io/flutter/view/FlutterView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java index 2c5dbce716..dff7a5e2d8 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/FlutterView.java @@ -320,8 +320,12 @@ public class FlutterView extends SurfaceView implements BinaryMessenger, Texture * * Sets it on top of its window. The background color still needs to be * controlled from within the Flutter UI itself. + * + * @deprecated This breaks accessibility highlighting. See https://github.com/flutter/flutter/issues/37025. */ + @Deprecated public void enableTransparentBackground() { + Log.w(TAG, "Warning: FlutterView is set on top of the window. Accessibility highlights will not be visible in the Flutter UI. https://github.com/flutter/flutter/issues/37025"); setZOrderOnTop(true); getHolder().setFormat(PixelFormat.TRANSPARENT); }