Loading packages/SystemUI/src/com/android/systemui/ExpandHelper.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -514,7 +514,7 @@ public class ExpandHelper implements Gefingerpoken { if (canBeExpanded) { if (canBeExpanded) { if (DEBUG) Log.d(TAG, "working on an expandable child"); if (DEBUG) Log.d(TAG, "working on an expandable child"); mNaturalHeight = mScaler.getNaturalHeight(); mNaturalHeight = mScaler.getNaturalHeight(); mSmallSize = v.getMinExpandHeight(); mSmallSize = v.getCollapsedHeight(); } else { } else { if (DEBUG) Log.d(TAG, "working on a non-expandable child"); if (DEBUG) Log.d(TAG, "working on a non-expandable child"); mNaturalHeight = mOldHeight; mNaturalHeight = mOldHeight; Loading packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -170,22 +170,22 @@ public class DragDownHelper implements Gefingerpoken { : RUBBERBAND_FACTOR_STATIC; : RUBBERBAND_FACTOR_STATIC; float rubberband = heightDelta * rubberbandFactor; float rubberband = heightDelta * rubberbandFactor; if (expandable if (expandable && (rubberband + child.getMinExpandHeight()) > child.getMaxContentHeight()) { && (rubberband + child.getCollapsedHeight()) > child.getMaxContentHeight()) { float overshoot = float overshoot = (rubberband + child.getMinExpandHeight()) - child.getMaxContentHeight(); (rubberband + child.getCollapsedHeight()) - child.getMaxContentHeight(); overshoot *= (1 - RUBBERBAND_FACTOR_STATIC); overshoot *= (1 - RUBBERBAND_FACTOR_STATIC); rubberband -= overshoot; rubberband -= overshoot; } } child.setActualHeight((int) (child.getMinExpandHeight() + rubberband)); child.setActualHeight((int) (child.getCollapsedHeight() + rubberband)); } } private void cancelExpansion(final ExpandableView child) { private void cancelExpansion(final ExpandableView child) { if (child.getActualHeight() == child.getMinExpandHeight()) { if (child.getActualHeight() == child.getCollapsedHeight()) { mCallback.setUserLockedChild(child, false); mCallback.setUserLockedChild(child, false); return; return; } } ObjectAnimator anim = ObjectAnimator.ofInt(child, "actualHeight", ObjectAnimator anim = ObjectAnimator.ofInt(child, "actualHeight", child.getActualHeight(), child.getMinExpandHeight()); child.getActualHeight(), child.getCollapsedHeight()); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.addListener(new AnimatorListenerAdapter() { anim.addListener(new AnimatorListenerAdapter() { Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if(mExpandedWhenPinned) { if(mExpandedWhenPinned) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); return Math.max(getMaxExpandHeight(), mHeadsUpHeight); } else if (atLeastMinHeight) { } else if (atLeastMinHeight) { return Math.max(getMinHeight(), mHeadsUpHeight); return Math.max(getCollapsedHeight(), mHeadsUpHeight); } else { } else { return mHeadsUpHeight; return mHeadsUpHeight; } } Loading Loading @@ -1040,12 +1040,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } else if (isExpanded()) { } else if (isExpanded()) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); return Math.max(getMaxExpandHeight(), mHeadsUpHeight); } else { } else { return Math.max(getMinHeight(), mHeadsUpHeight); return Math.max(getCollapsedHeight(), mHeadsUpHeight); } } } else if (isExpanded()) { } else if (isExpanded()) { return getMaxExpandHeight(); return getMaxExpandHeight(); } else { } else { return getMinHeight(); return getCollapsedHeight(); } } } } Loading Loading @@ -1301,9 +1301,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } @Override @Override public int getMinExpandHeight() { public int getCollapsedHeight() { if (mIsSummaryWithChildren && !mShowingPublic) { if (mIsSummaryWithChildren && !mShowingPublic) { return mChildrenContainer.getMinExpandHeight(); return mChildrenContainer.getCollapsedHeight(); } } return getMinHeight(); return getMinHeight(); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -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 * @return The collapsed height of this view. Note that this might be different * than {@link #getMinHeight()} because some elements can't be collapsed by an expand gesture * than {@link #getMinHeight()} because some elements like groups may have different sizes when * to it's absolute minimal height * they are system expanded. */ */ public int getMinExpandHeight() { public int getCollapsedHeight() { return getHeight(); return getHeight(); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -604,7 +604,7 @@ public class NotificationContentView extends FrameLayout { } } int expandedVisualType = getVisualTypeForHeight(height); int expandedVisualType = getVisualTypeForHeight(height); int collapsedVisualType = getVisualTypeForHeight( int collapsedVisualType = getVisualTypeForHeight( mContainingNotification.getMinExpandHeight()); mContainingNotification.getCollapsedHeight()); return mTransformationStartVisibleType == collapsedVisualType return mTransformationStartVisibleType == collapsedVisualType ? expandedVisualType ? expandedVisualType : collapsedVisualType; : collapsedVisualType; Loading Loading
packages/SystemUI/src/com/android/systemui/ExpandHelper.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -514,7 +514,7 @@ public class ExpandHelper implements Gefingerpoken { if (canBeExpanded) { if (canBeExpanded) { if (DEBUG) Log.d(TAG, "working on an expandable child"); if (DEBUG) Log.d(TAG, "working on an expandable child"); mNaturalHeight = mScaler.getNaturalHeight(); mNaturalHeight = mScaler.getNaturalHeight(); mSmallSize = v.getMinExpandHeight(); mSmallSize = v.getCollapsedHeight(); } else { } else { if (DEBUG) Log.d(TAG, "working on a non-expandable child"); if (DEBUG) Log.d(TAG, "working on a non-expandable child"); mNaturalHeight = mOldHeight; mNaturalHeight = mOldHeight; Loading
packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -170,22 +170,22 @@ public class DragDownHelper implements Gefingerpoken { : RUBBERBAND_FACTOR_STATIC; : RUBBERBAND_FACTOR_STATIC; float rubberband = heightDelta * rubberbandFactor; float rubberband = heightDelta * rubberbandFactor; if (expandable if (expandable && (rubberband + child.getMinExpandHeight()) > child.getMaxContentHeight()) { && (rubberband + child.getCollapsedHeight()) > child.getMaxContentHeight()) { float overshoot = float overshoot = (rubberband + child.getMinExpandHeight()) - child.getMaxContentHeight(); (rubberband + child.getCollapsedHeight()) - child.getMaxContentHeight(); overshoot *= (1 - RUBBERBAND_FACTOR_STATIC); overshoot *= (1 - RUBBERBAND_FACTOR_STATIC); rubberband -= overshoot; rubberband -= overshoot; } } child.setActualHeight((int) (child.getMinExpandHeight() + rubberband)); child.setActualHeight((int) (child.getCollapsedHeight() + rubberband)); } } private void cancelExpansion(final ExpandableView child) { private void cancelExpansion(final ExpandableView child) { if (child.getActualHeight() == child.getMinExpandHeight()) { if (child.getActualHeight() == child.getCollapsedHeight()) { mCallback.setUserLockedChild(child, false); mCallback.setUserLockedChild(child, false); return; return; } } ObjectAnimator anim = ObjectAnimator.ofInt(child, "actualHeight", ObjectAnimator anim = ObjectAnimator.ofInt(child, "actualHeight", child.getActualHeight(), child.getMinExpandHeight()); child.getActualHeight(), child.getCollapsedHeight()); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setInterpolator(Interpolators.FAST_OUT_SLOW_IN); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.setDuration(SPRING_BACK_ANIMATION_LENGTH_MS); anim.addListener(new AnimatorListenerAdapter() { anim.addListener(new AnimatorListenerAdapter() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if(mExpandedWhenPinned) { if(mExpandedWhenPinned) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); return Math.max(getMaxExpandHeight(), mHeadsUpHeight); } else if (atLeastMinHeight) { } else if (atLeastMinHeight) { return Math.max(getMinHeight(), mHeadsUpHeight); return Math.max(getCollapsedHeight(), mHeadsUpHeight); } else { } else { return mHeadsUpHeight; return mHeadsUpHeight; } } Loading Loading @@ -1040,12 +1040,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } else if (isExpanded()) { } else if (isExpanded()) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); return Math.max(getMaxExpandHeight(), mHeadsUpHeight); } else { } else { return Math.max(getMinHeight(), mHeadsUpHeight); return Math.max(getCollapsedHeight(), mHeadsUpHeight); } } } else if (isExpanded()) { } else if (isExpanded()) { return getMaxExpandHeight(); return getMaxExpandHeight(); } else { } else { return getMinHeight(); return getCollapsedHeight(); } } } } Loading Loading @@ -1301,9 +1301,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } @Override @Override public int getMinExpandHeight() { public int getCollapsedHeight() { if (mIsSummaryWithChildren && !mShowingPublic) { if (mIsSummaryWithChildren && !mShowingPublic) { return mChildrenContainer.getMinExpandHeight(); return mChildrenContainer.getCollapsedHeight(); } } return getMinHeight(); return getMinHeight(); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -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 * @return The collapsed height of this view. Note that this might be different * than {@link #getMinHeight()} because some elements can't be collapsed by an expand gesture * than {@link #getMinHeight()} because some elements like groups may have different sizes when * to it's absolute minimal height * they are system expanded. */ */ public int getMinExpandHeight() { public int getCollapsedHeight() { return getHeight(); return getHeight(); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -604,7 +604,7 @@ public class NotificationContentView extends FrameLayout { } } int expandedVisualType = getVisualTypeForHeight(height); int expandedVisualType = getVisualTypeForHeight(height); int collapsedVisualType = getVisualTypeForHeight( int collapsedVisualType = getVisualTypeForHeight( mContainingNotification.getMinExpandHeight()); mContainingNotification.getCollapsedHeight()); return mTransformationStartVisibleType == collapsedVisualType return mTransformationStartVisibleType == collapsedVisualType ? expandedVisualType ? expandedVisualType : collapsedVisualType; : collapsedVisualType; Loading