From 8554f90ea61858cd2fdd370e3a34c4340b780086 Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Sun, 21 May 2023 21:29:09 +0100 Subject: [PATCH] Fix TaskView bind and orientation state called multiple times DWB toast initialization is being called 3 times for every TaskView. Twice during the TaskView bind (setOrientationState and bind), and for every TaskView loaded in applyLoadPlan the bind and the setOrientationState are invoked. This CL removes the excessive calls in the TaskView bind and applyLoadPlan. The DWB for the focused task view is still being called twice due to orientation update for the focused task. Bug: 281980412 Flag: N/A Test: atest DigitalWellBeingToastTest Change-Id: Id301b53b9cb0dfc23a81debec67a6de9a35485b9 --- .../src/com/android/quickstep/views/RecentsView.java | 8 +++++++- quickstep/src/com/android/quickstep/views/TaskView.java | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index d8fe32db85..de07fb7a84 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1631,6 +1631,10 @@ public abstract class RecentsView