Skip to content

Commit 88c3a51

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Fix a bug in double-swiping panels..." into jb-mr1-dev
2 parents 04fe8eb + 750bb9b commit 88c3a51

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ public boolean onTouch(View v, MotionEvent event) {
295295
}
296296

297297
public void fling(float vel, boolean always) {
298+
if (DEBUG) LOG("fling: vel=%.3f, this=%s", vel, this);
298299
mVel = vel;
299300

300301
if (always||mVel != 0) {
@@ -416,18 +417,21 @@ public void setBar(PanelBar panelBar) {
416417

417418
public void collapse() {
418419
// TODO: abort animation or ongoing touch
420+
if (DEBUG) LOG("collapse: " + this);
419421
if (!isFullyCollapsed()) {
422+
mTimeAnimator.cancel();
423+
mClosing = true;
420424
// collapse() should never be a rubberband, even if an animation is already running
421425
mRubberbanding = false;
422426
fling(-mSelfCollapseVelocityPx, /*always=*/ true);
423427
}
424428
}
425429

426430
public void expand() {
431+
if (DEBUG) LOG("expand: " + this);
427432
if (isFullyCollapsed()) {
428433
mBar.startOpeningPanel(this);
429-
if (DEBUG) LOG("expand: calling fling(%s, true)", mSelfExpandVelocityPx);
430-
fling (mSelfExpandVelocityPx, /*always=*/ true);
434+
fling(mSelfExpandVelocityPx, /*always=*/ true);
431435
} else if (DEBUG) {
432436
if (DEBUG) LOG("skipping expansion: is expanded");
433437
}

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public void onAllPanelsCollapsed() {
149149

150150
@Override
151151
public void onPanelFullyOpened(PanelView openPanel) {
152+
super.onPanelFullyOpened(openPanel);
152153
mFadingPanel = openPanel;
153154
mShouldFade = true; // now you own the fade, mister
154155
}

0 commit comments

Comments
 (0)