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

Commit f2d8cd30 authored by Muyuan Li's avatar Muyuan Li Committed by android-build-merger
Browse files

sysui: refactor for extensibility. am: 4fe4a409

am: 3ece1f85

* commit '3ece1f85':
  sysui: refactor for extensibility.

Change-Id: Iaa8218503635bccc361b3b85e4e160885a0c52ba
parents 7d8ac1a7 3ece1f85
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ public class QSContainer extends FrameLayout {
    private final Rect mQsBounds = new Rect();

    private int mHeightOverride = -1;
    private QSPanel mQSPanel;
    protected QSPanel mQSPanel;
    private QSDetail mQSDetail;
    protected BaseStatusBarHeader mHeader;
    private float mQsExpansion;
    protected float mQsExpansion;
    private boolean mQsExpanded;
    private boolean mHeaderAnimating;
    private boolean mKeyguardShowing;
@@ -162,12 +162,16 @@ public class QSContainer extends FrameLayout {
    }

    private void updateBottom() {
        int height = calculateContainerHeight();
        setBottom(getTop() + height);
        mQSDetail.setBottom(getTop() + height);
    }

    protected int calculateContainerHeight() {
        int heightOverride = mHeightOverride != -1 ? mHeightOverride : getMeasuredHeight();
        int height = mQSCustomizer.isCustomizing() ? mQSCustomizer.getHeight()
        return mQSCustomizer.isCustomizing() ? mQSCustomizer.getHeight()
                : (int) (mQsExpansion * (heightOverride - mHeader.getCollapsedHeight()))
                + mHeader.getCollapsedHeight();
        setBottom(getTop() + height);
        mQSDetail.setBottom(getTop() + height);
    }

    private void updateQsState() {
@@ -302,4 +306,8 @@ public class QSContainer extends FrameLayout {
            updateQsState();
        }
    };

    public int getQsMinExpansionHeight() {
        return mHeader.getHeight();
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ public class NotificationPanelView extends PanelView implements

        // Calculate quick setting heights.
        int oldMaxHeight = mQsMaxExpansionHeight;
        mQsMinExpansionHeight = mKeyguardShowing ? 0 : mQsContainer.getHeader().getHeight();
        mQsMinExpansionHeight = mKeyguardShowing ? 0 : mQsContainer.getQsMinExpansionHeight();
        mQsMaxExpansionHeight = mQsContainer.getDesiredHeight();
        positionClockAndNotifications();
        if (mQsExpanded && mQsFullyExpanded) {
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ public class NotificationStackScrollLayout extends ViewGroup
            setDimAmount((Float) animation.getAnimatedValue());
        }
    };
    private ViewGroup mQsContainer;
    protected ViewGroup mQsContainer;
    private boolean mContinuousShadowUpdate;
    private ViewTreeObserver.OnPreDrawListener mShadowUpdater
            = new ViewTreeObserver.OnPreDrawListener() {