From 6b7a734450d837ece4dee7c636a2325ea5124a83 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 6 Apr 2022 09:59:48 -0700 Subject: [PATCH] Uncomment SemanticsFlag.isMultiline in enums (flutter/engine#32440) Uncomments the Java Flag.IS_MULTILINE and C++ SemanticsFlag.kIsMultiline enum values. While these values aren't used in the Android or iOS embeddings, in practice we maintain the same set of enum values across all embeddings so as to match the public API defined in dart:ui, found in lib/ui/semantics/semantics.dart. This also helps with automated checking that all enums across all languages are consistent. This will be added to the embedder API in https://github.com/flutter/engine/pull/32332. Issue: https://github.com/flutter/flutter/issues/101217 --- engine/src/flutter/lib/ui/semantics/semantics_node.h | 3 +-- .../platform/android/io/flutter/view/AccessibilityBridge.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/lib/ui/semantics/semantics_node.h b/engine/src/flutter/lib/ui/semantics/semantics_node.h index 70c0fcf7c5..cede05943a 100644 --- a/engine/src/flutter/lib/ui/semantics/semantics_node.h +++ b/engine/src/flutter/lib/ui/semantics/semantics_node.h @@ -81,8 +81,7 @@ enum class SemanticsFlags : int32_t { kHasToggledState = 1 << 16, kIsToggled = 1 << 17, kHasImplicitScrolling = 1 << 18, - // The Dart API defines the following flag but it isn't used in iOS. - // kIsMultiline = 1 << 19, + kIsMultiline = 1 << 19, kIsReadOnly = 1 << 20, kIsFocusable = 1 << 21, kIsLink = 1 << 22, diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java index b79191bd09..5ec1d97b1c 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -2045,8 +2045,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { HAS_TOGGLED_STATE(1 << 16), IS_TOGGLED(1 << 17), HAS_IMPLICIT_SCROLLING(1 << 18), - // The Dart API defines the following flag but it isn't used in Android. - // IS_MULTILINE(1 << 19); + IS_MULTILINE(1 << 19), IS_READ_ONLY(1 << 20), IS_FOCUSABLE(1 << 21), IS_LINK(1 << 22),