From 48074e97b5d8d9b1236b6222de25d5741497f9cb Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 5 Apr 2022 17:01:45 -0700 Subject: [PATCH] Uncomment SemanticsFlag.isMultiline in enums 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 --- 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/lib/ui/semantics/semantics_node.h b/lib/ui/semantics/semantics_node.h index 70c0fcf7c554b..cede05943ac14 100644 --- a/lib/ui/semantics/semantics_node.h +++ b/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/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/shell/platform/android/io/flutter/view/AccessibilityBridge.java index b79191bd09970..5ec1d97b1c329 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -2045,8 +2045,7 @@ public enum Action { 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),