summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-01-14 17:05:21 -0800
committerAlan Viverette <alanv@google.com>2015-01-14 17:05:21 -0800
commita0c0ca738989fd3ecad8a54a91f0c6a8b30ad1ab (patch)
tree1169bc3b6e40e6c79e5dbd343b0e4f5e96ea4fb2 /graphics/java
parentc8ba2e87a40eb70ad22c62b9768e7691e3ff3bc3 (diff)
downloadframeworks_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.java2
-rw-r--r--graphics/java/android/graphics/drawable/RippleBackground.java2
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;