De-flake testImeAnimationCallbacksShowAndHide

This CL defers setting requested visible types if IME is not ready
regardless of the control. The requested visible types will be set when
fromIme is true.

Fix: 284172248
Bug: 283342812
Test: WindowInsetsAnimationImeTests#testImeAnimationCallbacksShowAndHide
Change-Id: Id7d96f063f96f6e3783aa450b694d1a13bd98471
This commit is contained in:
Tiger
2023-05-30 17:24:54 +08:00
committed by Tiger Huang
parent 878b61b063
commit a14cdcaa70

View File

@@ -1374,7 +1374,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
// The requested visibilities should be delayed as well. Otherwise, we might override
// the insets visibility before playing animation.
setRequestedVisibleTypes(mReportedRequestedVisibleTypes, typesReady);
setRequestedVisibleTypes(mReportedRequestedVisibleTypes, types);
Trace.asyncTraceEnd(TRACE_TAG_VIEW, "IC.showRequestFromApi", 0);
if (!fromIme) {