diff options
| author | 2016-10-19 15:15:43 +0000 | |
|---|---|---|
| committer | 2016-10-19 15:15:43 +0000 | |
| commit | fb56958223bbfe4c7f9ee3e677682a5ef8275fbb (patch) | |
| tree | d61c4832eaa57b43e60224ae797b969554f011ee | |
| parent | cedb97bfb641d096a4805cc1758e742b06835c74 (diff) | |
| parent | 03e4eb32fecd890fe120d1ef34339213077bda49 (diff) | |
Merge "Hide QS customizer correctly"
am: 03e4eb32fe
Change-Id: I8c1998de76beee26b703781a6f883e9efd24bde3
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSPanel.java | 4 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index fef89305e553..dfc89fa45706 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -217,7 +217,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } public void onCollapse() { - if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { + if (mCustomizePanel != null && mCustomizePanel.isShown()) { mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); } } @@ -396,7 +396,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } public void closeDetail() { - if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { + if (mCustomizePanel != null && mCustomizePanel.isShown()) { // Treat this as a detail panel for now, to make things easy. mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); return; diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java index 0de1e3022b6c..77da6d4c7b21 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -162,6 +162,10 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene } } + public boolean isShown() { + return isShown; + } + private void setCustomizing(boolean customizing) { mCustomizing = customizing; mQsContainer.notifyCustomizeChanged(); @@ -216,7 +220,9 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene private final AnimatorListener mExpandAnimationListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { - setCustomizing(true); + if (isShown) { + setCustomizing(true); + } mNotifQsContainer.setCustomizerAnimating(false); } |