Thanks for the help.
I thought I'd share my exact solution as my goal was to create a bitmap that takes up the full screen and has a square cutout in the top area.
This code does the trick:
private void createMask()
{
int dimension = 300;
ImageView mask = new ImageView(_activity);
//Create the square to serve as the mask
Bitmap squareMask = Bitmap.createBitmap(dimension,dimension, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(squareMask);
Paint black = new Paint();
black.setStyle(Paint.Style.FILL);
black.setColor(Color.BLACK);
canvas.drawRect(0.0f,0.0f,(float)dimension,(float)dimension,black);
//create the darkness bitmap
Bitmap darknessView = Bitmap.createBitmap((int)screenWidthPX(),(int)screenHeightPX(), Bitmap.Config.ARGB_8888);
canvas = new Canvas(darknessView);
black.setStyle(Paint.Style.FILL);
black.setColor(Color.BLACK);
canvas.drawRect(0.0f,0.0f,(int)screenWidthPX(),(int)screenHeightPX(),black);
//create the masked version of the darknessView
Bitmap darknessViewMasked = Bitmap.createBitmap((int)screenWidthPX(),(int)screenHeightPX(), Bitmap.Config.ARGB_8888);
canvas = new Canvas(darknessViewMasked);
Paint paint = new Paint();
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
canvas.drawBitmap(darknessView,0,0,null);
canvas.drawBitmap(squareMask,0,0,paint);
paint.setXfermode(null);
_darknessView.setImageBitmap(darknessViewMasked);
root.addView(_darknessView);
}