diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index fef89305e5537..dfc89fa457060 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 0de1e3022b6c9..77da6d4c7b211 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); }