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

Commit 5da9e2eb authored by Matt Pietal's avatar Matt Pietal Committed by android-build-merger
Browse files

Merge "Sharesheet - 4->8 direct share expansion fix" into qt-dev am: 43e9ec23

am: 34f76fa1

Change-Id: I9385fb394add7f7607e92fdcb60e9a844d3f1996
parents 3c6e88ac 34f76fa1
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
@@ -2545,8 +2545,8 @@ public class ChooserActivity extends ResolverActivity {

            if (isDirectShare) {
                DirectShareViewHolder dsvh = (DirectShareViewHolder) holder;
                setViewHeight(dsvh.getRow(0), holder.getMeasuredRowHeight());
                setViewHeight(dsvh.getRow(1), holder.getMeasuredRowHeight());
                setViewHeight(dsvh.getRow(0), dsvh.getMinRowHeight());
                setViewHeight(dsvh.getRow(1), dsvh.getMinRowHeight());
            }

            viewGroup.setTag(holder);
@@ -2828,6 +2828,10 @@ public class ChooserActivity extends ResolverActivity {
            return mDirectShareCurrHeight;
        }

        public int getMinRowHeight() {
            return mDirectShareMinHeight;
        }

        public void setViewVisibility(int i, int visibility) {
            final View v = getView(i);
            if (visibility == View.VISIBLE) {
@@ -2850,6 +2854,10 @@ public class ChooserActivity extends ResolverActivity {
        }

        public void handleScroll(AbsListView view, int y, int oldy, int maxTargetsPerRow) {
            // only exit early if fully collapsed, otherwise onListRebuilt() with shifting
            // targets can lock us into an expanded mode
            boolean notExpanded = mDirectShareCurrHeight == mDirectShareMinHeight;
            if (notExpanded) {
                if (mHideDirectShareExpansion) {
                    return;
                }
@@ -2860,6 +2868,7 @@ public class ChooserActivity extends ResolverActivity {
                    mHideDirectShareExpansion = true;
                    return;
                }
            }

            int yDiff = (int) ((oldy - y) * DIRECT_SHARE_EXPANSION_RATE);