summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Blitzstein <sblitz@google.com>2013-11-08 12:41:00 -0800
committerSam Blitzstein <sblitz@google.com>2013-11-08 12:41:00 -0800
commitbe9a52bfb24c55b6b0e0bcc5ed1859245d63dc8e (patch)
tree92351afbee2dda6df8628e3fae87fe0f50762940
parentc4ba226c78b8478de6ac8e293d7f9bc64cba36ec (diff)
downloadbitmap-be9a52bfb24c55b6b0e0bcc5ed1859245d63dc8e.tar.gz
Have validate() ensure parllaxMultiplier is not 1
If the parallax feature is turned on, validate() should check that parallaxSpeedMultiplier != 1. Change-Id: Id660c300cf86db62778f77acb2890a0ca9e8f6e0
-rw-r--r--src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java b/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
index 6fd4e27..b8b28da 100644
--- a/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
+++ b/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
@@ -681,7 +681,7 @@ public class ExtendedBitmapDrawable extends BasicBitmapDrawable implements
"ExtendedOptions: To support FEATURE_ORDERED_DISPLAY, "
+ "decodeAggregator must be set.");
}
- if ((features & FEATURE_PARALLAX) != 0 && parallaxSpeedMultiplier == 0) {
+ if ((features & FEATURE_PARALLAX) != 0 && parallaxSpeedMultiplier == 1) {
throw new IllegalStateException(
"ExtendedOptions: To support FEATURE_PARALLAX, "
+ "parallaxSpeedMultiplier must be set.");