From 1a721d6022d280e912a372759ef941f0314b3a0f Mon Sep 17 00:00:00 2001 From: Kazuki Takise Date: Fri, 14 Oct 2022 15:55:39 +0900 Subject: Don't always suppres redraw report request in relayout I6faad4b9adac7334df7caf3d23df59bd3e96bfd9 added an optimization so a newly visible window won't be relayouted several times with shell transitions but this seems to conflict with Ie545465cac0207631ada6dac003340ca80eb2b14 that the relayout won't return syncId to trigger reporting finish draw. Especially when a window size gets changed but visibility doesn't, we seem to rely on the code path of relayout->reportResize. If this code path is suppressed, a new buffer won't get drawn for the change and the transition will time out. Bug: 237743987 Test: Multi-activity PIP works on ARC T Change-Id: Id2b5a335c05f5977a7b72e58470218f075c302f9 --- services/core/java/com/android/server/wm/WindowState.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index c161a9b26f59..a2c827c4b34f 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -6104,8 +6104,7 @@ class WindowState extends WindowContainer implements WindowManagerP if (mRedrawForSyncReported) { return false; } - // TODO(b/233286785): Remove mIsWallpaper once WallpaperService handles syncId of relayout. - if (mInRelayout && !mIsWallpaper) { + if (mInRelayout && mPrepareSyncSeqId > 0) { // The last sync seq id will return to the client, so there is no need to request the // client to redraw. return false; -- cgit v1.2.3-59-g8ed1b