Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,7 @@ public class KeyButtonView extends ImageView { float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f; float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f; boolean mSupportsLongpress = true; boolean mSupportsLongpress = true; RectF mRect = new RectF(0f,0f,0f,0f); RectF mRect = new RectF(0f,0f,0f,0f); AnimatorSet mPressedAnim; Runnable mCheckLongPress = new Runnable() { Runnable mCheckLongPress = new Runnable() { public void run() { public void run() { Loading Loading @@ -173,7 +174,10 @@ public class KeyButtonView extends ImageView { public void setPressed(boolean pressed) { public void setPressed(boolean pressed) { if (mGlowBG != null) { if (mGlowBG != null) { if (pressed != isPressed()) { if (pressed != isPressed()) { AnimatorSet as = new AnimatorSet(); if (mPressedAnim != null && mPressedAnim.isRunning()) { mPressedAnim.cancel(); } final AnimatorSet as = mPressedAnim = new AnimatorSet(); if (pressed) { if (pressed) { if (mGlowScale < GLOW_MAX_SCALE_FACTOR) if (mGlowScale < GLOW_MAX_SCALE_FACTOR) mGlowScale = GLOW_MAX_SCALE_FACTOR; mGlowScale = GLOW_MAX_SCALE_FACTOR; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,7 @@ public class KeyButtonView extends ImageView { float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f; float mGlowAlpha = 0f, mGlowScale = 1f, mDrawingAlpha = 1f; boolean mSupportsLongpress = true; boolean mSupportsLongpress = true; RectF mRect = new RectF(0f,0f,0f,0f); RectF mRect = new RectF(0f,0f,0f,0f); AnimatorSet mPressedAnim; Runnable mCheckLongPress = new Runnable() { Runnable mCheckLongPress = new Runnable() { public void run() { public void run() { Loading Loading @@ -173,7 +174,10 @@ public class KeyButtonView extends ImageView { public void setPressed(boolean pressed) { public void setPressed(boolean pressed) { if (mGlowBG != null) { if (mGlowBG != null) { if (pressed != isPressed()) { if (pressed != isPressed()) { AnimatorSet as = new AnimatorSet(); if (mPressedAnim != null && mPressedAnim.isRunning()) { mPressedAnim.cancel(); } final AnimatorSet as = mPressedAnim = new AnimatorSet(); if (pressed) { if (pressed) { if (mGlowScale < GLOW_MAX_SCALE_FACTOR) if (mGlowScale < GLOW_MAX_SCALE_FACTOR) mGlowScale = GLOW_MAX_SCALE_FACTOR; mGlowScale = GLOW_MAX_SCALE_FACTOR; Loading