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

Commit 0c62a56b authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Check insets again for clipboard UI post-animation

In some cases (particularly copying back to the clipboard after the
clipboard EditTextActivity) there's a race condition where the keyboard
insets are still visible when we check, even though the keyboard then
disappears. To mitigate this we can recheck the window insets once the
animation finishes, and expand the view automatically if the keyboard is
no longer showing.

Bug: 358479709
Fix: 358479709
Flag: EXEMPT trivial change
Test: manual (visual change)
Change-Id: If87a4e143568f24ec70a3dc919ca3d16d32d9253
parent 8b6d2d95
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -575,6 +575,10 @@ public class ClipboardOverlayController implements ClipboardListener.ClipboardOv
            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                // check again after animation to see if we should still be minimized
                if (mIsMinimized && !shouldShowMinimized(mWindow.getWindowInsets())) {
                    animateFromMinimized();
                }
                if (mOnUiUpdate != null) {
                    mOnUiUpdate.run();
                }