Android PorterDuffXfermode on ICS
===

there is some code that works perfectly on Android 2.2, but in Android 4 produces only a black view. That is the onDraw method:

    
                Paint paint=new Paint();
                PorterDuffXfermode exclude=new PorterDuffXfermode(PorterDuff.Mode.SRC_OUT);
                paint.setAntiAlias(true);
                paint.setDither(true);


                //The dimensions are OK and they are at the center of the screen
                canvas.drawBitmap(mask, screenWidth / 2 - pixelsToSp(100), screenHeight / 2 - pixelsToSp(100), paint);


                
                paint.setXfermode(exclude);
                //PS:targetRect is a portion of screen
                c.drawBitmap(source, null, targetRect, p);
                paint.setXfermode(null);


PS: mask and spotlight are two bitmap.



Without setting Xfermode to paint the two bitmap are drawn (incorrectly for my scope, but drawn in the right place and with the right size)