diff options
author | Joe Onorato <joeo@android.com> | 2009-10-15 20:39:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-10-15 20:39:51 -0700 |
commit | 2b7e284dc140f904f6cea95a6b2c4b8fc6749214 (patch) | |
tree | 50d4e528813191ba3ed37a4cbeb0ad831cb450ff /services | |
parent | 6c502d0b2ab2605b96cf1e677746fa7a53cda28b (diff) | |
parent | 034cd0be57d76b3bf5c7a3c118f6f10e67755772 (diff) | |
download | frameworks_base-2b7e284dc140f904f6cea95a6b2c4b8fc6749214.zip frameworks_base-2b7e284dc140f904f6cea95a6b2c4b8fc6749214.tar.gz frameworks_base-2b7e284dc140f904f6cea95a6b2c4b8fc6749214.tar.bz2 |
am 034cd0be: Merge change I486fdb55 into eclair
Merge commit '034cd0be57d76b3bf5c7a3c118f6f10e67755772' into eclair-mr2
* commit '034cd0be57d76b3bf5c7a3c118f6f10e67755772':
Fix bug 2183179 - Hitting the back key repeatedly makes the notification shade jump up and down
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/status/StatusBarService.java | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index fe761ea..59e9832 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -140,7 +140,7 @@ public class StatusBarService extends IStatusBar.Stub boolean down = event.getAction() == KeyEvent.ACTION_DOWN; switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: - if (down) { + if (!down) { StatusBarService.this.deactivate(); } return true; @@ -973,15 +973,24 @@ public class StatusBarService extends IStatusBar.Stub } void animateCollapse() { - if (SPEW) Log.d(TAG, "Animate collapse: expanded=" + mExpanded - + " expanded visible=" + mExpandedVisible); + if (SPEW) { + Log.d(TAG, "animateCollapse(): mExpanded=" + mExpanded + + " mExpandedVisible=" + mExpandedVisible + + " mAnimating=" + mAnimating + + " mAnimVel=" + mAnimVel); + } if (!mExpandedVisible) { return; } - prepareTracking(mDisplay.getHeight()-1); - performFling(mDisplay.getHeight()-1, -2000.0f, true); + if (mAnimating) { + return; + } + + int y = mDisplay.getHeight()-1; + prepareTracking(y); + performFling(y, -2000.0f, true); } void performExpand() { @@ -1096,7 +1105,7 @@ public class StatusBarService extends IStatusBar.Stub mTracking = true; mVelocityTracker = VelocityTracker.obtain(); boolean opening = !mExpanded; - if (!mExpanded) { + if (opening) { mAnimAccel = 2000.0f; mAnimVel = 200; mAnimY = mStatusBarView.getHeight(); @@ -1111,16 +1120,13 @@ public class StatusBarService extends IStatusBar.Stub mAnimating = true; mHandler.sendMessageAtTime(mHandler.obtainMessage(MSG_ANIMATE_REVEAL), mCurAnimationTime); + makeExpandedVisible(); } else { // it's open, close it? if (mAnimating) { mAnimating = false; mHandler.removeMessages(MSG_ANIMATE); } - } - if (opening) { - makeExpandedVisible(); - } else { updateExpandedViewPos(y + mViewDelta); } } @@ -1547,7 +1553,7 @@ public class StatusBarService extends IStatusBar.Stub void updateExpandedViewPos(int expandedPosition) { if (SPEW) { - Log.d(TAG, "updateExpandedViewPos before pos=" + expandedPosition + Log.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition + " mTrackingParams.y=" + mTrackingParams.y + " mTrackingPosition=" + mTrackingPosition); } |