Merge "TaskThumbnailView - post updates to overlays." into ub-launcher3-qt-dev am: e1abaa64c2
am: 214ce9fc1b

Change-Id: Ib5757fa3c25d2741e76de37d32cabd513722f046
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java
index 6f10b42..d55a520 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -367,8 +367,11 @@
         }
 
         mRotated = isRotated;
-        updateOverlay();
         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