Fixed the launch animation with flag auto cancel
Previously the cancelling wasn't delayed until the
panel collapsed, leading to bad transitions and
animations. Also fixed double clicks better.
Change-Id: I2523e226b60b3d5744a920582cb99f5ca8042fdc
Fixes: 69168591
Test: add notification with auto cancel, click on it
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index f7d0967..e32914f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -89,6 +89,7 @@
private boolean mTouchCancelled;
private boolean mTouchActive;
private boolean mExpandAnimationRunning;
+ private boolean mExpandAnimationPending;
public StatusBarWindowView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -268,7 +269,7 @@
|| ev.getActionMasked() == MotionEvent.ACTION_CANCEL) {
setTouchActive(false);
}
- if (mTouchCancelled || mExpandAnimationRunning) {
+ if (mTouchCancelled || mExpandAnimationRunning || mExpandAnimationPending) {
return false;
}
mFalsingManager.onTouchEvent(ev, getWidth(), getHeight());
@@ -393,6 +394,10 @@
mExpandAnimationRunning = expandAnimationRunning;
}
+ public void setExpandAnimationPending(boolean pending) {
+ mExpandAnimationPending = pending;
+ }
+
public class LayoutParams extends FrameLayout.LayoutParams {
public boolean ignoreRightInset;