From 19296c0ffd3af71829516daa85ef496364b29798 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 4 Mar 2024 10:40:19 -0800 Subject: [PATCH] Guard against API 22 (flutter/engine#51167) This was introduced in #51070 - my grepping for `LOLLIPOP` was too aggressive, and apparently the linter didn't catch this. I think it's just a bug in the linter. Fixes b/327717572, because Google internal tests caught this. --- .../io/flutter/view/AccessibilityBridge.java | 2 +- .../src/flutter/tools/android_lint/.gitignore | 2 + .../flutter/tools/android_lint/project.xml | 166 ------------------ 3 files changed, 3 insertions(+), 167 deletions(-) delete mode 100644 engine/src/flutter/tools/android_lint/project.xml 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 84b0a48d4a..4536897225 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 @@ -763,7 +763,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { result.setParent(rootAccessibilityView); } - if (semanticsNode.previousNodeId != -1) { + if (semanticsNode.previousNodeId != -1 && Build.VERSION.SDK_INT >= 22) { result.setTraversalAfter(rootAccessibilityView, semanticsNode.previousNodeId); } diff --git a/engine/src/flutter/tools/android_lint/.gitignore b/engine/src/flutter/tools/android_lint/.gitignore index e44752dc20..c42d614977 100644 --- a/engine/src/flutter/tools/android_lint/.gitignore +++ b/engine/src/flutter/tools/android_lint/.gitignore @@ -1 +1,3 @@ lint_report/ +# autogenerated by the tool, run in CI. +project.xml diff --git a/engine/src/flutter/tools/android_lint/project.xml b/engine/src/flutter/tools/android_lint/project.xml deleted file mode 100644 index 21593ab63a..0000000000 --- a/engine/src/flutter/tools/android_lint/project.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -