diff options
author | Daniel Sandler <dsandler@android.com> | 2012-10-03 16:24:00 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-10-03 16:24:50 -0400 |
commit | 750bb9bff9fccf94f4bbf5945e10ce3f76534e7f (patch) | |
tree | a5c04bda70c6041f1212ed3e7085770a5244c8ed /packages | |
parent | db9a37627835192f582f6c3755aafbc4d0f8e090 (diff) | |
download | frameworks_base-750bb9bff9fccf94f4bbf5945e10ce3f76534e7f.zip frameworks_base-750bb9bff9fccf94f4bbf5945e10ce3f76534e7f.tar.gz frameworks_base-750bb9bff9fccf94f4bbf5945e10ce3f76534e7f.tar.bz2 |
Fix a bug in double-swiping panels...
...that could cause them both to be shown at once.
Bug: 7179458
Change-Id: I32e51bd6d4f5773d0f4f5d3e99a84d299cd4b766
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java | 8 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index ca1f75c..de62179 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -295,6 +295,7 @@ public class PanelView extends FrameLayout { } public void fling(float vel, boolean always) { + if (DEBUG) LOG("fling: vel=%.3f, this=%s", vel, this); mVel = vel; if (always||mVel != 0) { @@ -416,7 +417,10 @@ public class PanelView extends FrameLayout { public void collapse() { // TODO: abort animation or ongoing touch + if (DEBUG) LOG("collapse: " + this); if (!isFullyCollapsed()) { + mTimeAnimator.cancel(); + mClosing = true; // collapse() should never be a rubberband, even if an animation is already running mRubberbanding = false; fling(-mSelfCollapseVelocityPx, /*always=*/ true); @@ -424,10 +428,10 @@ public class PanelView extends FrameLayout { } public void expand() { + if (DEBUG) LOG("expand: " + this); if (isFullyCollapsed()) { mBar.startOpeningPanel(this); - if (DEBUG) LOG("expand: calling fling(%s, true)", mSelfExpandVelocityPx); - fling (mSelfExpandVelocityPx, /*always=*/ true); + fling(mSelfExpandVelocityPx, /*always=*/ true); } else if (DEBUG) { if (DEBUG) LOG("skipping expansion: is expanded"); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 15ac5c0..516b1ab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -149,6 +149,7 @@ public class PhoneStatusBarView extends PanelBar { @Override public void onPanelFullyOpened(PanelView openPanel) { + super.onPanelFullyOpened(openPanel); mFadingPanel = openPanel; mShouldFade = true; // now you own the fade, mister } |