Merge "Improve reliability of focus clearing" into rvc-qpr-dev
diff --git a/src/com/android/car/rotary/RotaryService.java b/src/com/android/car/rotary/RotaryService.java
index e9143eb..be15728 100644
--- a/src/com/android/car/rotary/RotaryService.java
+++ b/src/com/android/car/rotary/RotaryService.java
@@ -1708,6 +1708,11 @@
             return false;
         }
         AccessibilityNodeInfo focusParkingView = findFocusParkingView(mFocusedNode);
+
+        // Refresh the node to ensure the focused state is up to date. The node came directly from
+        // the node tree but it could have been cached by the accessibility framework.
+        focusParkingView = Utils.refreshNode(focusParkingView);
+
         if (focusParkingView == null) {
             return false;
         }