Overview - don't update task overlay on thumbnail update.

Only init and reset the task overlay on the enabled state of the overlay
changing.
Previously the overlay was also updated when the thumbnail changed, but
this can happen for lots of different reasons so was causing janky
transitions and potentially excess work in code that was following the
overlay.

The overlay code really only cares about the thumbnail after the task has
settled, so should be safe to ignore the thumbnail updates.



Bug: 188097940
Test: local build and run on p5
Change-Id: I4ad1767046cb0316af19713bc188788d8f581d7c
diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
index 5b8d4ce..02888a1 100644
--- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -335,16 +335,13 @@
     public void setOverlayEnabled(boolean overlayEnabled) {
         if (mOverlayEnabled != overlayEnabled) {
             mOverlayEnabled = overlayEnabled;
-            updateOverlay();
-        }
-    }
 
-    private void updateOverlay() {
-        if (mOverlayEnabled) {
-            getTaskOverlay().initOverlay(mTask, mThumbnailData, mPreviewPositionHelper.mMatrix,
-                    mPreviewPositionHelper.mIsOrientationChanged);
-        } else {
-            getTaskOverlay().reset();
+            if (mOverlayEnabled) {
+                getTaskOverlay().initOverlay(mTask, mThumbnailData, mPreviewPositionHelper.mMatrix,
+                        mPreviewPositionHelper.mIsOrientationChanged);
+            } else {
+                getTaskOverlay().reset();
+            }
         }
     }
 
@@ -379,10 +376,6 @@
         }
         getTaskView().updateCurrentFullscreenParams(mPreviewPositionHelper);
         invalidate();
-
-        // Update can be called from {@link #onSizeChanged} during layout, post handling of overlay
-        // as overlay could modify the views in the overlay as a side effect of its update.
-        post(this::updateOverlay);
     }
 
     @Override