Buggy code:
public class CircleImageView extends ImageView { private static final ScaleType SCALE_TYPE = ScaleType . CENTER_CROP ; private static final Config BITMAP_CONFIG = Config . ARGB_8888 ; private static final int COLORDRAWABLE_DIMENSION = 1 ; private static final int DEFAULT_BORDER_WIDTH = 0 ; private static final int DEFAULT_BORDER_COLOR = Color . BLACK ; private static final int DEFAULT_SELECTOR_COLOR = Color . WHITE ; private static final int DEFAULT_SELECTOR_BORDER_COLOR = Color . RED ; private final RectF mDrawableRect = new RectF ( ) ; private final RectF mBorderRect = new RectF ( ) ; private final Matrix mShaderMatrix = new Matrix ( ) ; private final Paint mBitmapPaint = new Paint ( ) ; private final Paint mBorderPaint = new Paint ( ) ; private int mBorderColor = CircleImageView . DEFAULT_BORDER_COLOR ; private int mBorderWidth = CircleImageView . DEFAULT_BORDER_WIDTH ; private int mSelectorBorderColor = CircleImageView . DEFAULT_SELECTOR_BORDER_COLOR ; private int mSelectorColor = CircleImageView . DEFAULT_SELECTOR_COLOR ; private ColorFilter mSelectorColorFilter ; private Bitmap mBitmap ; private BitmapShader mBitmapShader ; private int mBitmapWidth ; private int mBitmapHeight ; private float mDrawableRadius ; private float mBorderRadius ; private boolean mIsSelected = false ; private boolean mReady ; private boolean mSetupPending ; public CircleImageView ( Context context ) { } public CircleImageView ( Context context , AttributeSet attrs ) { } public CircleImageView ( Context context , AttributeSet attrs , int defStyle ) { } private void init ( ) { } @ Override public ScaleType getScaleType ( ) { } @ Override public void setScaleType ( ScaleType scaleType ) { } @ Override public void setAdjustViewBounds ( boolean adjustViewBounds ) { } @ Override protected void onDraw ( Canvas canvas ) { } @ Override protected void onSizeChanged ( int w , int h , int oldw , int oldh ) { } public int getBorderColor ( ) { } public void setBorderColor ( int borderColor ) { } public int getBorderWidth ( ) { } public void setBorderWidth ( int borderWidth ) { } public int getSelectorBorderColor ( ) { } public void setSelectorBorderColor ( int selectorBorderColor ) { } public ColorFilter getSelectorColor ( ) { } public void setSelectorColor ( int selectorColor ) { } @ Override public void setImageBitmap ( Bitmap bm ) { } @ Override public void setImageDrawable ( Drawable drawable ) { } @ Override public void setImageResource ( int resId ) { } @ Override public void setImageURI ( Uri uri ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { if ( ! ( isClickable ( ) ) ) { mIsSelected = false ; return super . onTouchEvent ( event ) ; } switch ( event . getAction ( ) ) { case MotionEvent . ACTION_DOWN : mIsSelected = true ; break ; case MotionEvent . ACTION_MOVE : int x = ( ( int ) ( event . getX ( ) ) ) ; int y = ( ( int ) ( event . getY ( ) ) ) ; int extraTouchArea = 13 ; x += extraTouchArea ; y += extraTouchArea ; if ( ! ( mDrawableRect . contains ( x , y ) ) ) { mIsSelected = false ; } break ; case MotionEvent . ACTION_UP : mIsSelected = false ; break ; case MotionEvent . ACTION_OUTSIDE : break ; case MotionEvent . ACTION_CANCEL : mIsSelected = false ; break ; } setup ( ) ; <START_BUG> return true ; <END_BUG> } private Bitmap getBitmapFromDrawable ( Drawable drawable ) { } private void setup ( ) { } private void updateShaderMatrix ( ) { } No newline ; at end ; of file ; }

Fix:
return super . onTouchEvent ( event ) ;