From 320a27b539b7d4ff5b4f1329644d20e550eb55dd Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Fri, 26 Jun 2015 14:10:44 -0700 Subject: Removing junit.framework.Assert from wallpaper picker code Bug: 22124692 Change-Id: Ifd41727a2ce4af660818b4f0cd6b95110ffdeec4 --- .../src/com/android/gallery3d/glrenderer/BitmapTexture.java | 4 ++-- WallpaperPicker/src/com/android/gallery3d/glrenderer/GLPaint.java | 4 ++-- .../src/com/android/gallery3d/glrenderer/UploadedTexture.java | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'WallpaperPicker') diff --git a/WallpaperPicker/src/com/android/gallery3d/glrenderer/BitmapTexture.java b/WallpaperPicker/src/com/android/gallery3d/glrenderer/BitmapTexture.java index 100b0b3b9..f8b01cb42 100644 --- a/WallpaperPicker/src/com/android/gallery3d/glrenderer/BitmapTexture.java +++ b/WallpaperPicker/src/com/android/gallery3d/glrenderer/BitmapTexture.java @@ -18,7 +18,7 @@ package com.android.gallery3d.glrenderer; import android.graphics.Bitmap; -import junit.framework.Assert; +import com.android.gallery3d.common.Utils; // BitmapTexture is a texture whose content is specified by a fixed Bitmap. // @@ -34,7 +34,7 @@ public class BitmapTexture extends UploadedTexture { public BitmapTexture(Bitmap bitmap, boolean hasBorder) { super(hasBorder); - Assert.assertTrue(bitmap != null && !bitmap.isRecycled()); + Utils.assertTrue(bitmap != null && !bitmap.isRecycled()); mContentBitmap = bitmap; } diff --git a/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLPaint.java b/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLPaint.java index 16b220690..b26e9ab29 100644 --- a/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLPaint.java +++ b/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLPaint.java @@ -16,7 +16,7 @@ package com.android.gallery3d.glrenderer; -import junit.framework.Assert; +import com.android.gallery3d.common.Utils; public class GLPaint { private float mLineWidth = 1f; @@ -31,7 +31,7 @@ public class GLPaint { } public void setLineWidth(float width) { - Assert.assertTrue(width >= 0); + Utils.assertTrue(width >= 0); mLineWidth = width; } diff --git a/WallpaperPicker/src/com/android/gallery3d/glrenderer/UploadedTexture.java b/WallpaperPicker/src/com/android/gallery3d/glrenderer/UploadedTexture.java index 67abf6564..8075bf868 100644 --- a/WallpaperPicker/src/com/android/gallery3d/glrenderer/UploadedTexture.java +++ b/WallpaperPicker/src/com/android/gallery3d/glrenderer/UploadedTexture.java @@ -20,10 +20,9 @@ import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.opengl.GLUtils; +import com.android.gallery3d.common.Utils; import com.android.launcher3.util.Thunk; -import junit.framework.Assert; - import java.util.HashMap; import javax.microedition.khronos.opengles.GL11; @@ -146,7 +145,7 @@ public abstract class UploadedTexture extends BasicTexture { } private void freeBitmap() { - Assert.assertTrue(mBitmap != null); + Utils.assertTrue(mBitmap != null); onFreeBitmap(mBitmap); mBitmap = null; } @@ -221,7 +220,7 @@ public abstract class UploadedTexture extends BasicTexture { int texWidth = getTextureWidth(); int texHeight = getTextureHeight(); - Assert.assertTrue(bWidth <= texWidth && bHeight <= texHeight); + Utils.assertTrue(bWidth <= texWidth && bHeight <= texHeight); // Upload the bitmap to a new texture. mId = canvas.getGLId().generateTexture(); -- cgit v1.2.3