Loading graphics/java/android/graphics/Bitmap.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -401,8 +401,9 @@ public final class Bitmap implements Parcelable { /** /** * This is called by methods that want to throw an exception if the bitmap * This is called by methods that want to throw an exception if the bitmap * has already been recycled. * has already been recycled. * @hide */ */ private void checkRecycled(String errorMessage) { void checkRecycled(String errorMessage) { if (mRecycled) { if (mRecycled) { throw new IllegalStateException(errorMessage); throw new IllegalStateException(errorMessage); } } Loading graphics/java/android/graphics/BitmapShader.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class BitmapShader extends Shader { if (bitmap == null) { if (bitmap == null) { throw new IllegalArgumentException("Bitmap must be non-null"); throw new IllegalArgumentException("Bitmap must be non-null"); } } bitmap.checkRecycled("Cannot create BitmapShader for recycled bitmap"); mBitmap = bitmap; mBitmap = bitmap; mTileX = tileX; mTileX = tileX; mTileY = tileY; mTileY = tileY; Loading Loading @@ -188,6 +189,8 @@ public class BitmapShader extends Shader { /** @hide */ /** @hide */ @Override @Override protected long createNativeInstance(long nativeMatrix, boolean filterFromPaint) { protected long createNativeInstance(long nativeMatrix, boolean filterFromPaint) { mBitmap.checkRecycled("BitmapShader's bitmap has been recycled"); boolean enableLinearFilter = mFilterMode == FILTER_MODE_LINEAR; boolean enableLinearFilter = mFilterMode == FILTER_MODE_LINEAR; if (mFilterMode == FILTER_MODE_DEFAULT) { if (mFilterMode == FILTER_MODE_DEFAULT) { mFilterFromPaint = filterFromPaint; mFilterFromPaint = filterFromPaint; Loading Loading
graphics/java/android/graphics/Bitmap.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -401,8 +401,9 @@ public final class Bitmap implements Parcelable { /** /** * This is called by methods that want to throw an exception if the bitmap * This is called by methods that want to throw an exception if the bitmap * has already been recycled. * has already been recycled. * @hide */ */ private void checkRecycled(String errorMessage) { void checkRecycled(String errorMessage) { if (mRecycled) { if (mRecycled) { throw new IllegalStateException(errorMessage); throw new IllegalStateException(errorMessage); } } Loading
graphics/java/android/graphics/BitmapShader.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -120,6 +120,7 @@ public class BitmapShader extends Shader { if (bitmap == null) { if (bitmap == null) { throw new IllegalArgumentException("Bitmap must be non-null"); throw new IllegalArgumentException("Bitmap must be non-null"); } } bitmap.checkRecycled("Cannot create BitmapShader for recycled bitmap"); mBitmap = bitmap; mBitmap = bitmap; mTileX = tileX; mTileX = tileX; mTileY = tileY; mTileY = tileY; Loading Loading @@ -188,6 +189,8 @@ public class BitmapShader extends Shader { /** @hide */ /** @hide */ @Override @Override protected long createNativeInstance(long nativeMatrix, boolean filterFromPaint) { protected long createNativeInstance(long nativeMatrix, boolean filterFromPaint) { mBitmap.checkRecycled("BitmapShader's bitmap has been recycled"); boolean enableLinearFilter = mFilterMode == FILTER_MODE_LINEAR; boolean enableLinearFilter = mFilterMode == FILTER_MODE_LINEAR; if (mFilterMode == FILTER_MODE_DEFAULT) { if (mFilterMode == FILTER_MODE_DEFAULT) { mFilterFromPaint = filterFromPaint; mFilterFromPaint = filterFromPaint; Loading