Merge "Hide QS customizer correctly"
This commit is contained in:
@@ -215,7 +215,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);
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user