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

Commit c2fe7f72 authored by Selim Cinek's avatar Selim Cinek
Browse files

resolve merge conflicts of 72722d65 to master

Change-Id: I5b6fe90f52573cd9c7f7259df653b7e095858794
parents b5bf7ee0 72722d65
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@
    <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. -->
    <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item>

    <!-- max height of a notification such that the content can still fade out when closing -->
    <dimen name="max_notification_fadeout_height">100dp</dimen>

    <!-- End margin for the RSSI status icon of a device connected via bluetooth. -->
    <dimen name="status_bar_connected_device_signal_margin_end">16dp</dimen>

+6 −1
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ public class NotificationPanelView extends PanelView implements
    private boolean mExpandingFromHeadsUp;
    private boolean mCollapsedOnDown;
    private int mPositionMinSideMargin;
    private int mMaxFadeoutHeight;
    private int mLastOrientation = -1;
    private boolean mClosingWithAlphaFadeOut;
    private boolean mHeadsUpAnimatingAway;
@@ -278,6 +279,8 @@ public class NotificationPanelView extends PanelView implements
                R.dimen.qs_falsing_threshold);
        mPositionMinSideMargin = getResources().getDimensionPixelSize(
                R.dimen.notification_panel_min_side_margin);
        mMaxFadeoutHeight = getResources().getDimensionPixelSize(
                R.dimen.max_notification_fadeout_height);
    }

    public void updateResources() {
@@ -552,7 +555,9 @@ public class NotificationPanelView extends PanelView implements
    protected void flingToHeight(float vel, boolean expand, float target,
            float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) {
        mHeadsUpTouchHelper.notifyFling(!expand);
        setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f);
        setClosingWithAlphaFadeout(!expand
                && mNotificationStackScroller.getFirstChildIntrinsicHeight() <= mMaxFadeoutHeight
                && getFadeoutAlpha() == 1.0f);
        super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing);
    }

+4 −4
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ public class NotificationStackScrollLayout extends ViewGroup
     */
    private float getExpandTranslationStart() {
        int startPosition = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()
                ? 0 : -getFirstChildMinHeight();
                ? 0 : -getFirstChildIntrinsicHeight();
        return startPosition - mTopPadding;
    }

@@ -2142,17 +2142,17 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    public int getLayoutMinHeight() {
        int firstChildMinHeight = getFirstChildMinHeight();
        int firstChildMinHeight = getFirstChildIntrinsicHeight();
        return Math.min(firstChildMinHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight,
                mMaxLayoutHeight - mTopPadding);
    }

    private int getFirstChildMinHeight() {
    public int getFirstChildIntrinsicHeight() {
        final ExpandableView firstChild = getFirstChildNotGone();
        int firstChildMinHeight = firstChild != null
                ? firstChild.getIntrinsicHeight()
                : mEmptyShadeView != null
                        ? mEmptyShadeView.getMinHeight()
                        ? mEmptyShadeView.getIntrinsicHeight()
                        : mCollapsedSize;
        if (mOwnScrollY > 0) {
            firstChildMinHeight = Math.max(firstChildMinHeight - mOwnScrollY, mCollapsedSize);