Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ public AccessibilityNodeInfo findFocus(int focus) {
*/
private SemanticsNode getRootSemanticsNode() {
if (BuildConfig.DEBUG && !flutterSemanticsTree.containsKey(0)) {
Log.e(TAG, "Attempted to getRootSemanticsNode without a root sematnics node.");
Log.e(TAG, "Attempted to getRootSemanticsNode without a root semantics node.");
}
return flutterSemanticsTree.get(0);
}
Expand Down Expand Up @@ -1140,6 +1140,9 @@ public boolean onAccessibilityHoverEvent(MotionEvent event) {
if (!accessibilityManager.isTouchExplorationEnabled()) {
return false;
}
if (flutterSemanticsTree.isEmpty()) {
return false;
}

SemanticsNode semanticsNodeUnderCursor = getRootSemanticsNode().hitTest(new float[] {event.getX(), event.getY(), 0, 1});
if (semanticsNodeUnderCursor.platformViewId != -1) {
Expand Down