summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSFragment.java6
2 files changed, 15 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index a128694f3e3b..31ddd977b7f0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -208,9 +208,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() {
@@ -226,6 +234,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();
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index 4242e1bb666b..6fd81411dbc0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -37,7 +37,6 @@ import android.widget.ImageView;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
-import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.animation.Interpolators;
import com.android.systemui.dump.DumpManager;
@@ -238,6 +237,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