From 2b95c2413838c2e2b127ebab8fb4fead7d52e460 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 8 Feb 2010 17:40:30 -0800 Subject: Added more @RemotableViewMethod methods, mutate ImageView. Catch some View methods missed during the first pass of marking with @RemotableViewMethod annotation. Also adds new ImageView.setColorFilter(int) to match the android:tint XML attribute. When ImageView touches ColorFilter or alpha, mutate the underlying Drawable. Fix NPE in StateListDrawable.mutate(). --- graphics/java/android/graphics/drawable/StateListDrawable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'graphics') diff --git a/graphics/java/android/graphics/drawable/StateListDrawable.java b/graphics/java/android/graphics/drawable/StateListDrawable.java index b1d588e..b94df84 100644 --- a/graphics/java/android/graphics/drawable/StateListDrawable.java +++ b/graphics/java/android/graphics/drawable/StateListDrawable.java @@ -238,7 +238,10 @@ public class StateListDrawable extends DrawableContainer { final int count = sets.length; mStateListState.mStateSets = new int[count][]; for (int i = 0; i < count; i++) { - mStateListState.mStateSets[i] = sets[i].clone(); + final int[] set = sets[i]; + if (set != null) { + mStateListState.mStateSets[i] = set.clone(); + } } mMutated = true; } -- cgit v1.1