diff options
author | Jim Shuma <jshuma@google.com> | 2010-11-16 10:53:30 -0800 |
---|---|---|
committer | Jim Shuma <jshuma@google.com> | 2010-11-16 14:52:26 -0800 |
commit | 0f529a84c393814bccd851d94c34b77558dcbab0 (patch) | |
tree | 3461176a901b98ab102c3043438cbcdd7a3b0d3e /carousel/java | |
parent | ed5cdfa293ec57cb14b98cdc3fa00ac5ec1c1ed4 (diff) | |
download | android_frameworks_ex-0f529a84c393814bccd851d94c34b77558dcbab0.tar.gz android_frameworks_ex-0f529a84c393814bccd851d94c34b77558dcbab0.tar.bz2 android_frameworks_ex-0f529a84c393814bccd851d94c34b77558dcbab0.zip |
Don't throw an exception when invalidating an unset card
If the user calls invalidateDetailTexture() before calling
setDetailTexture(), don't throw an exception; just silently
ignore the call.
Change-Id: I9945a32319dd04729aa2b42b4c15a8d2880903d4
Diffstat (limited to 'carousel/java')
-rw-r--r-- | carousel/java/com/android/ex/carousel/CarouselRS.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/carousel/java/com/android/ex/carousel/CarouselRS.java b/carousel/java/com/android/ex/carousel/CarouselRS.java index f97d881..b59c0eb 100644 --- a/carousel/java/com/android/ex/carousel/CarouselRS.java +++ b/carousel/java/com/android/ex/carousel/CarouselRS.java @@ -569,7 +569,8 @@ public class CarouselRS { synchronized(this) { ScriptField_Card.Item item = mCards.get(n); if (item == null) { - throw new IllegalStateException("invalidateDetailTexture without an existing card"); + // This card was never created, so there's nothing to invalidate. + return; } if (eraseCurrent && item.detailTexture != null) { if (DBG) Log.v(TAG, "unloading texture " + n); |