OSDN Git Service

Correct some lint warnings
[android-x86/packages-apps-Eleven.git] / src / org / lineageos / eleven / widgets / AlphaPatternDrawable.java
index 040cd12..582bb9d 100644 (file)
@@ -16,6 +16,7 @@ import android.graphics.Bitmap.Config;
 import android.graphics.Canvas;
 import android.graphics.ColorFilter;
 import android.graphics.Paint;
+import android.graphics.PixelFormat;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 
@@ -63,7 +64,7 @@ public class AlphaPatternDrawable extends Drawable {
      */
     @Override
     public int getOpacity() {
-        return 0;
+        return PixelFormat.OPAQUE;
     }
 
     /**
@@ -92,8 +93,8 @@ public class AlphaPatternDrawable extends Drawable {
         final int mHeight = bounds.height();
         final int mWidth = bounds.width();
 
-        numRectanglesHorizontal = (int)Math.ceil((mWidth / mRectangleSize));
-        numRectanglesVertical = (int)Math.ceil(mHeight / mRectangleSize);
+        numRectanglesHorizontal = (int) Math.ceil(((double) mWidth / mRectangleSize));
+        numRectanglesVertical = (int) Math.ceil((double) mHeight / mRectangleSize);
 
         generatePatternBitmap();
     }