From 4293032b71e4683631f714303b7c500b6f5c5d19 Mon Sep 17 00:00:00 2001 From: Tiger Huang Date: Mon, 20 Sep 2021 15:42:14 +0800 Subject: [PATCH] Clear mSeamlessRotating in InsetsSourceProvider.setWindow Otherwise, if the insets source window is changed during seamless rotating, mSeamlessRotating will leak, which makes the insets cannot be controlled anymore. Fix: 193277149 Test: Open a landscape app which hides navigation bars from the portrait lockscreen on a device with taskbar. See if taskbar can be hidden. Change-Id: I8d2218d2da44cb09f0488ac6d00352e2900665e7 --- .../core/java/com/android/server/wm/InsetsSourceProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java index 767e2c2f19171..403df91851262 100644 --- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java +++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java @@ -163,6 +163,7 @@ class InsetsSourceProvider { // animate-out as new one animates-in. mWin.cancelAnimation(); mWin.mProvidedInsetsSources.remove(mSource.getType()); + mSeamlessRotating = false; } ProtoLog.d(WM_DEBUG_WINDOW_INSETS, "InsetsSource setWin %s for type %s", win, InsetsState.typeToString(mSource.getType()));