Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cff526e4 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Fix flicker caused by IME hiding twice

Avoid triggering the IME hide animation if the IME is already hidden.

Flag: EXEMPT bug fix
Bug: 377329425
Bug: 379474417
Test: manual
       - Create floating bubble and expand it
       - Show IME
       - Hide IME
       - Observe bubble is not flickering
Change-Id: I12713e59d36526f6bc7ff373c2c8e178b108ef4e
parent e3873301
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -419,8 +419,12 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
                // already (e.g., when focussing an editText in activity B, while and editText in
                // activity A is focussed), we will not get a call of #insetsControlChanged, and
                // therefore have to start the show animation from here
                if (visible || mImeShowing) {
                    // only start the animation if we're either already showing or becoming visible.
                    // otherwise starting another hide animation causes flickers.
                    startAnimation(mImeRequestedVisible /* show */, false /* forceRestart */,
                            statsToken);
                }

                // In case of a hide, the statsToken should not been send yet (as the animation
                // is still ongoing). It will be sent at the end of the animation