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

Commit 69753bb8 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Fixed a bug where the minHeight of groups was inaccurate" into nyc-dev am: fdb3073a

am: e41d6f7e

* commit 'e41d6f7e':
  Fixed a bug where the minHeight of groups was inaccurate

Change-Id: Iedaaa84e90ed548e318e912227581d28a825966f
parents a644cbed e41d6f7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ public class ExpandHelper implements Gefingerpoken {
        if (canBeExpanded) {
            if (DEBUG) Log.d(TAG, "working on an expandable child");
            mNaturalHeight = mScaler.getNaturalHeight();
            mSmallSize = v.getMinExpandHeight();
            mSmallSize = v.getCollapsedHeight();
        } else {
            if (DEBUG) Log.d(TAG, "working on a non-expandable child");
            mNaturalHeight = mOldHeight;
+5 −5
Original line number Diff line number Diff line
@@ -170,22 +170,22 @@ public class DragDownHelper implements Gefingerpoken {
                : RUBBERBAND_FACTOR_STATIC;
        float rubberband = heightDelta * rubberbandFactor;
        if (expandable
                && (rubberband + child.getMinExpandHeight()) > child.getMaxContentHeight()) {
                && (rubberband + child.getCollapsedHeight()) > child.getMaxContentHeight()) {
            float overshoot =
                    (rubberband + child.getMinExpandHeight()) - child.getMaxContentHeight();
                    (rubberband + child.getCollapsedHeight()) - child.getMaxContentHeight();
            overshoot *= (1 - RUBBERBAND_FACTOR_STATIC);
            rubberband -= overshoot;
        }
        child.setActualHeight((int) (child.getMinExpandHeight() + rubberband));
        child.setActualHeight((int) (child.getCollapsedHeight() + rubberband));
    }

    private void cancelExpansion(final ExpandableView child) {
        if (child.getActualHeight() == child.getMinExpandHeight()) {
        if (child.getActualHeight() == child.getCollapsedHeight()) {
            mCallback.setUserLockedChild(child, false);
            return;
        }
        ObjectAnimator anim = ObjectAnimator.ofInt(child, "actualHeight",
                child.getActualHeight(), child.getMinExpandHeight());
                child.getActualHeight(), child.getCollapsedHeight());
        anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
        anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS);
        anim.addListener(new AnimatorListenerAdapter() {
+5 −5
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        if(mExpandedWhenPinned) {
            return Math.max(getMaxExpandHeight(), mHeadsUpHeight);
        } else if (atLeastMinHeight) {
            return Math.max(getMinHeight(), mHeadsUpHeight);
            return Math.max(getCollapsedHeight(), mHeadsUpHeight);
        } else {
            return mHeadsUpHeight;
        }
@@ -1040,12 +1040,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
            } else if (isExpanded()) {
                return Math.max(getMaxExpandHeight(), mHeadsUpHeight);
            } else {
                return Math.max(getMinHeight(), mHeadsUpHeight);
                return Math.max(getCollapsedHeight(), mHeadsUpHeight);
            }
        } else if (isExpanded()) {
            return getMaxExpandHeight();
        } else {
            return getMinHeight();
            return getCollapsedHeight();
        }
    }

@@ -1301,9 +1301,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    }

    @Override
    public int getMinExpandHeight() {
    public int getCollapsedHeight() {
        if (mIsSummaryWithChildren && !mShowingPublic) {
            return mChildrenContainer.getMinExpandHeight();
            return mChildrenContainer.getCollapsedHeight();
        }
        return getMinHeight();
    }
+4 −4
Original line number Diff line number Diff line
@@ -153,11 +153,11 @@ public abstract class ExpandableView extends FrameLayout {
    }

    /**
     * @return The minimum height this child chan be expanded to. Note that this might be different
     * than {@link #getMinHeight()} because some elements can't be collapsed by an expand gesture
     * to it's absolute minimal height
     * @return The collapsed height of this view. Note that this might be different
     * than {@link #getMinHeight()} because some elements like groups may have different sizes when
     * they are system expanded.
     */
    public int getMinExpandHeight() {
    public int getCollapsedHeight() {
        return getHeight();
    }

+1 −1
Original line number Diff line number Diff line
@@ -604,7 +604,7 @@ public class NotificationContentView extends FrameLayout {
            }
            int expandedVisualType = getVisualTypeForHeight(height);
            int collapsedVisualType = getVisualTypeForHeight(
                    mContainingNotification.getMinExpandHeight());
                    mContainingNotification.getCollapsedHeight());
            return mTransformationStartVisibleType == collapsedVisualType
                    ? expandedVisualType
                    : collapsedVisualType;
Loading