Merge commit '0c5b58833a24586d1c414ca24123c8f10c1ceca0' into eclair-mr2-plus-aosp * commit '0c5b58833a24586d1c414ca24123c8f10c1ceca0': Stop crashing on invalid wallpaper thumbnail images.
This commit is contained in:
@@ -171,9 +171,17 @@ public class WallpaperChooser extends Activity implements AdapterView.OnItemSele
|
||||
} else {
|
||||
image = (ImageView) convertView;
|
||||
}
|
||||
|
||||
image.setImageResource(mThumbs.get(position));
|
||||
image.getDrawable().setDither(true);
|
||||
|
||||
int thumbRes = mThumbs.get(position);
|
||||
image.setImageResource(thumbRes);
|
||||
Drawable thumbDrawable = image.getDrawable();
|
||||
if (thumbDrawable != null) {
|
||||
thumbDrawable.setDither(true);
|
||||
} else {
|
||||
Log.e(Launcher.LOG_TAG, String.format(
|
||||
"Error decoding thumbnail resId=%d for wallpaper #%d",
|
||||
thumbRes, position));
|
||||
}
|
||||
return image;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user