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

Commit 9d85fd4d authored by Jon Miranda's avatar Jon Miranda Committed by Jonathan Miranda
Browse files

Fix startPostponedEnterTransition being called too early.

Bug: 174811491
Test: consecutive screenshot to share actions

Change-Id: Ieb6db02948e22c3a30a0874e0fb5881d249f8641
parent 852446ad
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -431,20 +431,23 @@ public class ChooserActivity extends ResolverActivity implements
        }

        private void maybeHideContentPreview() {
            if (!mAtLeastOneLoaded && mHideParentOnFail) {
            if (!mAtLeastOneLoaded) {
                if (mHideParentOnFail) {
                    Log.i(TAG, "Hiding image preview area. Timed out waiting for preview to load"
                            + " within " + mImageLoadTimeoutMillis + "ms.");
                    collapseParentView();
                    if (shouldShowTabs()) {
                        hideStickyContentPreview();
                    } else if (mChooserMultiProfilePagerAdapter.getCurrentRootAdapter() != null) {
                    mChooserMultiProfilePagerAdapter.getCurrentRootAdapter().hideContentPreview();
                        mChooserMultiProfilePagerAdapter.getCurrentRootAdapter()
                                .hideContentPreview();
                    }
                    mHideParentOnFail = false;
                }
                mRemoveSharedElements = true;
                startPostponedEnterTransition();
            }
        }

        private void collapseParentView() {
            // This will effectively hide the content preview row by forcing the height