Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c767689b authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] Removing junit.framework.Assert from wallpaper picker...

Merge "[DO NOT MERGE] Removing junit.framework.Assert from wallpaper picker code" into ub-launcher3-almonte
parents 42ea0db8 1a4b1eac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
    }

+2 −2
Original line number Diff line number Diff line
@@ -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;
    }

+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.opengl.GLUtils;

import junit.framework.Assert;
import com.android.gallery3d.common.Utils;

import java.util.HashMap;

@@ -144,7 +144,7 @@ public abstract class UploadedTexture extends BasicTexture {
    }

    private void freeBitmap() {
        Assert.assertTrue(mBitmap != null);
        Utils.assertTrue(mBitmap != null);
        onFreeBitmap(mBitmap);
        mBitmap = null;
    }
@@ -219,7 +219,7 @@ public abstract class UploadedTexture extends BasicTexture {
                int texWidth = getTextureWidth();
                int texHeight = getTextureHeight();

                Assert.assertTrue(bWidth <= texWidth && bHeight <= texHeight);
                assertTrue(bWidth <= texWidth && bHeight <= texHeight);

                // Upload the bitmap to a new texture.
                mId = canvas.getGLId().generateTexture();