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

Commit dff8e6ca authored by Sergey Serokurov's avatar Sergey Serokurov Committed by Automerger Merge Worker
Browse files

Merge "Set Manage button click listener using postDelayed" into tm-dev am: 49366617

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17258121

Change-Id: I0d3d898b8b474d4b2d56480543108c6aa0a7af00
parents f9c71c99 49366617
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2802,7 +2802,14 @@ public class BubbleStackView extends FrameLayout
            mExpandedViewContainer.setVisibility(View.INVISIBLE);
            mExpandedViewContainer.setAlpha(0f);
            mExpandedViewContainer.addView(bev);
            bev.setManageClickListener((view) -> showManageMenu(!mShowingManage));

            postDelayed(() -> {
                // Set the Manage button click handler from postDelayed. This appears to resolve
                // a race condition with adding the BubbleExpandedView view to the expanded view
                // container. Due to the race condition the click handler sometimes is not set up
                // correctly and is never called.
                bev.setManageClickListener((view) -> showManageMenu(true /* show */));
            }, 0);

            if (!mIsExpansionAnimating) {
                mSurfaceSynchronizer.syncSurfaceAndRun(() -> {