Merge "Hide QS customizer correctly"
am: 03e4eb32fe
Change-Id: I8c1998de76beee26b703781a6f883e9efd24bde3
This commit is contained in:
@@ -217,7 +217,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onCollapse() {
|
public void onCollapse() {
|
||||||
if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) {
|
if (mCustomizePanel != null && mCustomizePanel.isShown()) {
|
||||||
mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2);
|
mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void closeDetail() {
|
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.
|
// Treat this as a detail panel for now, to make things easy.
|
||||||
mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2);
|
mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -162,6 +162,10 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isShown() {
|
||||||
|
return isShown;
|
||||||
|
}
|
||||||
|
|
||||||
private void setCustomizing(boolean customizing) {
|
private void setCustomizing(boolean customizing) {
|
||||||
mCustomizing = customizing;
|
mCustomizing = customizing;
|
||||||
mQsContainer.notifyCustomizeChanged();
|
mQsContainer.notifyCustomizeChanged();
|
||||||
@@ -216,7 +220,9 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
|
|||||||
private final AnimatorListener mExpandAnimationListener = new AnimatorListenerAdapter() {
|
private final AnimatorListener mExpandAnimationListener = new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
if (isShown) {
|
||||||
setCustomizing(true);
|
setCustomizing(true);
|
||||||
|
}
|
||||||
mNotifQsContainer.setCustomizerAnimating(false);
|
mNotifQsContainer.setCustomizerAnimating(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user