// Path: app/src/main/java/com/ce/game/screenlocker/inter/RippleAnimationListener.java
// public interface RippleAnimationListener {
// 
//     /**
//      * Allow to listen to the end of the ripple animation
//      */
//     void onRippleAnimationEnd();
// }


import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
import com.ce.game.screenlocker.R;
import com.ce.game.screenlocker.inter.RippleAnimationListener;
                    canvas.restore();
                    invalidate();
                    return;
                } else
                    canvasHandler.postDelayed(runnable, FRAME_RATE);

                if (timer == 0)
                    canvas.save();

                canvas.drawCircle(x, y, (radiusMax * (((float) timer * FRAME_RATE) / DURATION)), paint);

                timer++;
            }
        } catch (RuntimeException e) {
            if (mAnimationListener != null) {
                mAnimationListener.onRippleAnimationEnd();
            }
        }finally {
            super.draw(canvas);
        }
    }

    @Override
    protected void onVisibilityChanged(View changedView, int visibility) {
        if (!isShown()) paint.setColor(Color.TRANSPARENT);

        super.onVisibilityChanged(changedView, visibility);
    }

    @Override
// Path: app/src/main/java/com/ce/game/screenlocker/inter/RippleAnimationListener.java
// public interface RippleAnimationListener {
// 
//     /**
//      * Allow to listen to the end of the ripple animation
//      */
//     void onRippleAnimationEnd();
// }


// Path: app/src/main/java/com/ce/game/screenlocker/view/RippleView.java
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
import com.ce.game.screenlocker.R;
import com.ce.game.screenlocker.inter.RippleAnimationListener;

                    canvas.restore();
                    invalidate();
                    return;
                } else
                    canvasHandler.postDelayed(runnable, FRAME_RATE);

                if (timer == 0)
                    canvas.save();

                canvas.drawCircle(x, y, (radiusMax * (((float) timer * FRAME_RATE) / DURATION)), paint);

                timer++;
            }
        } catch (RuntimeException e) {
            if (mAnimationListener != null) {
                mAnimationListener.onRippleAnimationEnd();
            }
        }finally {
            super.draw(canvas);
        }
    }

    @Override
    protected void onVisibilityChanged(View changedView, int visibility) {
        if (!isShown()) paint.setColor(Color.TRANSPARENT);

        super.onVisibilityChanged(changedView, visibility);
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {