From 54540a0620512b3a9628eacada15a212b837143e 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 (#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 +- tools/android_lint/.gitignore | 2 + tools/android_lint/project.xml | 166 ------------------ 3 files changed, 3 insertions(+), 167 deletions(-) delete mode 100644 tools/android_lint/project.xml diff --git a/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/shell/platform/android/io/flutter/view/AccessibilityBridge.java index 84b0a48d4a2e1..4536897225a23 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -763,7 +763,7 @@ public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) { result.setParent(rootAccessibilityView); } - if (semanticsNode.previousNodeId != -1) { + if (semanticsNode.previousNodeId != -1 && Build.VERSION.SDK_INT >= 22) { result.setTraversalAfter(rootAccessibilityView, semanticsNode.previousNodeId); } diff --git a/tools/android_lint/.gitignore b/tools/android_lint/.gitignore index e44752dc2001b..c42d61497735f 100644 --- a/tools/android_lint/.gitignore +++ b/tools/android_lint/.gitignore @@ -1 +1,3 @@ lint_report/ +# autogenerated by the tool, run in CI. +project.xml diff --git a/tools/android_lint/project.xml b/tools/android_lint/project.xml deleted file mode 100644 index 21593ab63ad0b..0000000000000 --- a/tools/android_lint/project.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -