未验证 提交 7f6149cb 编写于 作者: A Amir Hardon 提交者: GitHub

Revert "Remove use of the deprecated AccessibilityNodeInfo boundsInPa… (#16355)

上级 7ca44d33
......@@ -197,11 +197,19 @@ final class AccessibilityViewEmbedder {
flutterIdToOrigin.put(flutterId, origin);
}
// Supressing deprecation warning for AccessibilityNodeInfo#getBoundsinParent and
// AccessibilityNodeInfo#getBoundsinParent as we are copying the platform view's
// accessibility node and we should not lose any available bounds information.
@SuppressWarnings("deprecation")
private void setFlutterNodesTranslateBounds(
@NonNull AccessibilityNodeInfo originNode,
@NonNull Rect displayBounds,
@NonNull AccessibilityNodeInfo resultNode
) {
Rect boundsInParent = new Rect();
originNode.getBoundsInParent(boundsInParent);
resultNode.setBoundsInParent(boundsInParent);
Rect boundsInScreen = new Rect();
originNode.getBoundsInScreen(boundsInScreen);
boundsInScreen.offset(displayBounds.left, displayBounds.top);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册