Merge "Canceling expand animations as well when starting QS expansion" into mnc-dev

This commit is contained in:
Selim Cinek
2015-06-18 18:42:02 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 6 deletions

View File

@@ -491,7 +491,7 @@ public class NotificationPanelView extends PanelView implements
}
public void closeQs() {
cancelAnimation();
cancelQsAnimation();
setQsExpansion(mQsMinExpansionHeight);
}
@@ -508,7 +508,7 @@ public class NotificationPanelView extends PanelView implements
}
public void openQs() {
cancelAnimation();
cancelQsAnimation();
if (mQsExpansionEnabled) {
setQsExpansion(mQsMaxExpansionHeight);
}
@@ -921,7 +921,7 @@ public class NotificationPanelView extends PanelView implements
@Override
public void onOverscrollTopChanged(float amount, boolean isRubberbanded) {
cancelAnimation();
cancelQsAnimation();
if (!mQsExpansionEnabled) {
amount = 0f;
}
@@ -953,7 +953,8 @@ public class NotificationPanelView extends PanelView implements
}
private void onQsExpansionStarted(int overscrollAmount) {
cancelAnimation();
cancelQsAnimation();
cancelHeightAnimator();
// Reset scroll position and apply that position to the expanded height.
float height = mQsExpansionHeight - mScrollView.getScrollY() - overscrollAmount;
@@ -1391,7 +1392,7 @@ public class NotificationPanelView extends PanelView implements
return mVelocityTracker.getYVelocity();
}
private void cancelAnimation() {
private void cancelQsAnimation() {
if (mQsExpansionAnimator != null) {
mQsExpansionAnimator.cancel();
}

View File

@@ -535,7 +535,7 @@ public abstract class PanelView extends FrameLayout {
*/
protected abstract boolean isInContentBounds(float x, float y);
private void cancelHeightAnimator() {
protected void cancelHeightAnimator() {
if (mHeightAnimator != null) {
mHeightAnimator.cancel();
}