From 5095684e222b8130e7aa6363f1418d0de54e1110 Mon Sep 17 00:00:00 2001 From: Zak Cohen Date: Mon, 17 Jun 2019 15:27:28 -0700 Subject: [PATCH] TaskThumbnailView - post updates to overlays. Post the update of the overlay to handler. No way of knowing if an overlay will add / remove views during the update so assume its not safe to do in layout. Bug: 135287203 Test: manual Change-Id: I7bd0c86da096e7108b71b2d0530e99ee950d6f2e --- .../src/com/android/quickstep/views/TaskThumbnailView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 6f10b42fba..d55a520443 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 @@ public class TaskThumbnailView extends View { } 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