Update FocusArea history properly

Updates mPreviousFocusArea when the focus has moved from another
FocusArea to this FocusArea, and sets it to null in any other cases.

Bug: 170423337
Test: manual
Change-Id: I6220db7274f4686c6989ff4d105c1105973d3e0b
diff --git a/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/FocusArea.java b/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/FocusArea.java
index f5c6c1d..b71b3ab 100644
--- a/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/FocusArea.java
+++ b/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/FocusArea.java
@@ -282,10 +282,11 @@
 
     /**
      * Updates {@link #mPreviousFocusArea} when the focus has moved from another FocusArea to this
-     * FocusArea.
+     * FocusArea, and sets it to {@code null} in any other cases.
      */
     private void maybeUpdatePreviousFocusArea(boolean hasFocus, View oldFocus) {
-        if (mHasFocus || !hasFocus || oldFocus == null) {
+        if (mHasFocus || !hasFocus || oldFocus == null || oldFocus instanceof FocusParkingView) {
+            mPreviousFocusArea = null;
             return;
         }
         mPreviousFocusArea = getAncestorFocusArea(oldFocus);