File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
shell/platform/android/io/flutter/view Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 44
55package io .flutter .view ;
66
7+ import android .annotation .SuppressLint ;
78import android .annotation .TargetApi ;
89import android .content .ContentResolver ;
910import android .database .ContentObserver ;
@@ -489,6 +490,8 @@ private boolean shouldSetCollectionInfo(final SemanticsNode semanticsNode) {
489490 */
490491 @ Override
491492 @ SuppressWarnings ("deprecation" )
493+ // Supressing Lint warning for new API, as we are version guarding all calls to newer APIs
494+ @ SuppressLint ("NewApi" )
492495 public AccessibilityNodeInfo createAccessibilityNodeInfo (int virtualViewId ) {
493496 if (virtualViewId >= MIN_ENGINE_GENERATED_NODE_ID ) {
494497 // The node is in the engine generated range, and is provided by the accessibility view embedder.
@@ -753,6 +756,11 @@ public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
753756
754757 result .setSelected (semanticsNode .hasFlag (Flag .IS_SELECTED ));
755758
759+ // Heading support
760+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .P ) {
761+ result .setHeading (semanticsNode .hasFlag (Flag .IS_HEADER ));
762+ }
763+
756764 // Accessibility Focus
757765 if (accessibilityFocusedSemanticsNode != null && accessibilityFocusedSemanticsNode .id == virtualViewId ) {
758766 result .addAction (AccessibilityNodeInfo .ACTION_CLEAR_ACCESSIBILITY_FOCUS );
You can’t perform that action at this time.
0 commit comments