diff options
author | Alan Viverette <alanv@google.com> | 2015-01-14 17:05:21 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-01-14 17:05:21 -0800 |
commit | a0c0ca738989fd3ecad8a54a91f0c6a8b30ad1ab (patch) | |
tree | 1169bc3b6e40e6c79e5dbd343b0e4f5e96ea4fb2 /graphics/java | |
parent | c8ba2e87a40eb70ad22c62b9768e7691e3ff3bc3 (diff) | |
download | frameworks_base-a0c0ca738989fd3ecad8a54a91f0c6a8b30ad1ab.zip frameworks_base-a0c0ca738989fd3ecad8a54a91f0c6a8b30ad1ab.tar.gz frameworks_base-a0c0ca738989fd3ecad8a54a91f0c6a8b30ad1ab.tar.bz2 |
Jump ripples to end when switching to a non-hardware canvas
Previously we canceled the hardware animations but neglected to reset
the state, which left us drawing in the pressed state.
Bug: 19020524
Change-Id: I439a18126b9093cac40006361be99f8d077b95a9
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/Ripple.java | 2 | ||||
-rw-r--r-- | graphics/java/android/graphics/drawable/RippleBackground.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/Ripple.java b/graphics/java/android/graphics/drawable/Ripple.java index ba1e86c..bb1d3cb 100644 --- a/graphics/java/android/graphics/drawable/Ripple.java +++ b/graphics/java/android/graphics/drawable/Ripple.java @@ -214,7 +214,7 @@ class Ripple { final boolean canUseHardware = c.isHardwareAccelerated(); if (mCanUseHardware != canUseHardware && mCanUseHardware) { // We've switched from hardware to non-hardware mode. Panic. - cancelHardwareAnimations(false); + cancelHardwareAnimations(true); } mCanUseHardware = canUseHardware; diff --git a/graphics/java/android/graphics/drawable/RippleBackground.java b/graphics/java/android/graphics/drawable/RippleBackground.java index cc42aac..fae4902 100644 --- a/graphics/java/android/graphics/drawable/RippleBackground.java +++ b/graphics/java/android/graphics/drawable/RippleBackground.java @@ -148,7 +148,7 @@ class RippleBackground { final boolean canUseHardware = c.isHardwareAccelerated(); if (mCanUseHardware != canUseHardware && mCanUseHardware) { // We've switched from hardware to non-hardware mode. Panic. - cancelHardwareAnimations(false); + cancelHardwareAnimations(true); } mCanUseHardware = canUseHardware; |