Merge "Hide QS customizer correctly" am: 03e4eb32fe

am: fb56958223

Change-Id: I62095e8b8c5bea7627e59cf166abce1cfa4ce2f1
This commit is contained in:
Jason Monk
2016-10-19 15:23:40 +00:00
committed by android-build-merger
2 changed files with 9 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);
}