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
This commit is contained in:
Tiger Huang
2021-09-20 15:42:14 +08:00
parent a8ecb94434
commit 4293032b71

View File

@@ -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()));