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

Commit ea505a42 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add a click listener to QQS drag handler" into sc-v2-dev am: 33138749 am: c99988cd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15854670

Change-Id: Ibc7fc76d6d3a258346a741a3b59ad2d3f5b0c0de
parents 7f9b1e62 c99988cd
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -209,9 +209,17 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {

    protected int calculateContainerHeight() {
        int heightOverride = mHeightOverride != -1 ? mHeightOverride : getMeasuredHeight();
        // Need to add the dragHandle height so touches will be intercepted by it.
        int dragHandleHeight;
        if (mDragHandle.getVisibility() == VISIBLE) {
            dragHandleHeight = Math.round((1 - mQsExpansion) * mDragHandle.getHeight());
        } else {
            dragHandleHeight = 0;
        }
        return mQSCustomizer.isCustomizing() ? mQSCustomizer.getHeight()
                : Math.round(mQsExpansion * (heightOverride - mHeader.getHeight()))
                + mHeader.getHeight();
                + mHeader.getHeight()
                + dragHandleHeight;
    }

    int calculateContainerBottom() {
@@ -227,6 +235,7 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
        mQsExpansion = expansion;
        mQSPanelContainer.setScrollingEnabled(expansion > 0f);
        mDragHandle.setAlpha(1.0f - expansion);
        mDragHandle.setClickable(expansion == 0f); // Only clickable when fully collapsed
        updateExpansion();
    }

+5 −0
Original line number Diff line number Diff line
@@ -238,6 +238,11 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
                    mQSPanelController.getMediaHost().getHostView().setAlpha(1.0f);
                    mQSAnimator.requestAnimatorUpdate();
                });

        mQsDragHandler.setOnClickListener(v -> {
            Log.d(TAG, "drag handler clicked");
            mCommandQueue.animateExpandSettingsPanel(null);
        });
    }

    @Override