From bc55b2af3659e2bf8388393eb270d7bb1106514c Mon Sep 17 00:00:00 2001 From: Muyuan Li Date: Fri, 24 Jun 2016 15:40:51 -0700 Subject: [PATCH] sysui: refactor for extensibility. Add a flag to handleShowingDetail to indicate whether it really wants to expand QS. Bug: 29606112 Change-Id: I5738564a18787b5799817f762c787418f29f2e64 (cherry picked from commit 24822112c534c088d0985c20ea7a27df6e5f1785) --- .../SystemUI/src/com/android/systemui/qs/QSDetail.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetail.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetail.java index 167edcf0c7f3b..805e9d68b5219 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDetail.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetail.java @@ -152,12 +152,13 @@ public class QSDetail extends LinearLayout { - public void handleShowingDetail(final QSTile.DetailAdapter adapter, int x, int y) { + public void handleShowingDetail(final QSTile.DetailAdapter adapter, int x, int y, + boolean toggleQs) { final boolean showingDetail = adapter != null; setClickable(showingDetail); if (showingDetail) { setupDetailHeader(adapter); - if (!mFullyExpanded) { + if (toggleQs && !mFullyExpanded) { mTriggeredExpand = true; mHost.animateToggleQSExpansion(); } else { @@ -169,7 +170,7 @@ public class QSDetail extends LinearLayout { // Ensure we collapse into the same point we opened from. x = mOpenX; y = mOpenY; - if (mTriggeredExpand) { + if (toggleQs && mTriggeredExpand) { mHost.animateToggleQSExpansion(); mTriggeredExpand = false; } @@ -291,7 +292,7 @@ public class QSDetail extends LinearLayout { post(new Runnable() { @Override public void run() { - handleShowingDetail(detail, x, y); + handleShowingDetail(detail, x, y, true /* toggleQs */); } }); }