summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-01-23 07:23:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-23 07:23:56 -0800
commit5274d6f115e8c3fda053a0fd4b4009ab15790191 (patch)
tree5a6abe5efd5fa4bf3257ab1eedace33c46ab5c8a /packages
parent02d37b9731eaf5d79f9eb395576e030934c37f3b (diff)
parent60bc69ef76c32b9a24c0901e6c6e452b50de0cda (diff)
downloadframeworks_base-5274d6f115e8c3fda053a0fd4b4009ab15790191.zip
frameworks_base-5274d6f115e8c3fda053a0fd4b4009ab15790191.tar.gz
frameworks_base-5274d6f115e8c3fda053a0fd4b4009ab15790191.tar.bz2
Merge "Improve rapid-fire presses on system bar"
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 975c372..cc07240 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -55,6 +55,7 @@ public class KeyButtonView extends ImageView {
float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f;
boolean mSupportsLongpress = true;
RectF mRect = new RectF(0f,0f,0f,0f);
+ AnimatorSet mPressedAnim;
Runnable mCheckLongPress = new Runnable() {
public void run() {
@@ -173,7 +174,10 @@ public class KeyButtonView extends ImageView {
public void setPressed(boolean pressed) {
if (mGlowBG != null) {
if (pressed != isPressed()) {
- AnimatorSet as = new AnimatorSet();
+ if (mPressedAnim != null && mPressedAnim.isRunning()) {
+ mPressedAnim.cancel();
+ }
+ final AnimatorSet as = mPressedAnim = new AnimatorSet();
if (pressed) {
if (mGlowScale < GLOW_MAX_SCALE_FACTOR)
mGlowScale = GLOW_MAX_SCALE_FACTOR;