Disable fling on layout update after programmatic shade collapse

Shade collapse triggered by three-button-nav can lead to fling expand
on the next layout change. Theoretically this could affect any shade
collapse that doesn't involve a down action on the shade.

Test: verified behavior with logging
Bug: 285798806
Change-Id: Icc044e67177767a5ef1d745d7dfbcdc81e1054ba
This commit is contained in:
Shawn Lee
2023-06-22 10:58:07 -07:00
parent 4694c51dd5
commit 49a29550d4

View File

@@ -1822,6 +1822,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// Set after notifyExpandingStarted, as notifyExpandingStarted resets the closing state.
setClosing(true);
mUpdateFlingOnLayout = false;
if (delayed) {
mNextCollapseSpeedUpFactor = speedUpFactor;
this.mView.postDelayed(mFlingCollapseRunnable, 120);