Merge "Remove needlessly thrown IOException." into lmp-dev

automerge: f305d2c

* commit 'f305d2c4a80af9e2011824349adc6f133cd8822c':
  Remove needlessly thrown IOException.
This commit is contained in:
Deepanshu Gupta
2014-11-10 20:56:36 +00:00
committed by android-build-merger
2 changed files with 52 additions and 59 deletions

View File

@@ -141,7 +141,6 @@ public final class Bitmap_Delegate {
* Creates and returns a {@link Bitmap} initialized with the given stream content. * Creates and returns a {@link Bitmap} initialized with the given stream content.
* *
* @param input the stream from which to read the bitmap content * @param input the stream from which to read the bitmap content
* @param createFlags
* @param density the density associated with the bitmap * @param density the density associated with the bitmap
* *
* @see Bitmap#isPremultiplied() * @see Bitmap#isPremultiplied()
@@ -166,8 +165,7 @@ public final class Bitmap_Delegate {
* @see Bitmap#isMutable() * @see Bitmap#isMutable()
* @see Bitmap#getDensity() * @see Bitmap#getDensity()
*/ */
public static Bitmap createBitmap(BufferedImage image, boolean isMutable, public static Bitmap createBitmap(BufferedImage image, boolean isMutable, Density density) {
Density density) throws IOException {
return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density); return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density);
} }
@@ -175,7 +173,6 @@ public final class Bitmap_Delegate {
* Creates and returns a {@link Bitmap} initialized with the given {@link BufferedImage} * Creates and returns a {@link Bitmap} initialized with the given {@link BufferedImage}
* *
* @param image the bitmap content * @param image the bitmap content
* @param createFlags
* @param density the density associated with the bitmap * @param density the density associated with the bitmap
* *
* @see Bitmap#isPremultiplied() * @see Bitmap#isPremultiplied()
@@ -183,7 +180,7 @@ public final class Bitmap_Delegate {
* @see Bitmap#getDensity() * @see Bitmap#getDensity()
*/ */
public static Bitmap createBitmap(BufferedImage image, Set<BitmapCreateFlags> createFlags, public static Bitmap createBitmap(BufferedImage image, Set<BitmapCreateFlags> createFlags,
Density density) throws IOException { Density density) {
// create a delegate with the given image. // create a delegate with the given image.
Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.ARGB_8888); Bitmap_Delegate delegate = new Bitmap_Delegate(image, Config.ARGB_8888);

View File

@@ -57,7 +57,6 @@ public class RenderDrawable extends RenderAction<DrawableParams> {
public Result render() { public Result render() {
checkLock(); checkLock();
try {
// get the drawable resource value // get the drawable resource value
DrawableParams params = getParams(); DrawableParams params = getParams();
HardwareConfig hardwareConfig = params.getHardwareConfig(); HardwareConfig hardwareConfig = params.getHardwareConfig();
@@ -111,9 +110,6 @@ public class RenderDrawable extends RenderAction<DrawableParams> {
content.draw(canvas); content.draw(canvas);
return Status.SUCCESS.createResult(image); return Status.SUCCESS.createResult(image);
} catch (IOException e) {
return ERROR_UNKNOWN.createResult(e.getMessage(), e);
}
} }
protected BufferedImage getImage(int w, int h) { protected BufferedImage getImage(int w, int h) {