Tighten up loading of visible task data

- Certain animations can run after the launcher state has changed,
  triggering loading of task data even when the overview state is not
  visible. Only allow re/loading of this data when we are in the overview
  state.

Bug: 76162466
Change-Id: Ie1f492ef712ea4aa2db6f2e1bc7ba4390742875b
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index f038eff..f06342f 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -582,6 +582,11 @@
      * and unloads the associated task data for tasks that are no longer visible.
      */
     public void loadVisibleTaskData() {
+        if (!mOverviewStateEnabled) {
+            // Skip loading visible task data if we've already left the overview state
+            return;
+        }
+
         RecentsTaskLoader loader = mModel.getRecentsTaskLoader();
         int centerPageIndex = getPageNearestToCenterOfScreen();
         int lower = Math.max(0, centerPageIndex - 2);