@Override
    protected void onRestoreInstanceState(Parcelable state) {
        final SavedState ss = (SavedState) state;
        super.onRestoreInstanceState(ss.getSuperState());
        setPattern(DisplayMode.Correct, CellUtils.intArrayToPattern(ss.getSerializedPattern(), cellManager));
        patternDisplayMode = DisplayMode.values()[ss.getDisplayMode()];
        inputEnabled = ss.isInputEnabled();
        inStealthMode = ss.isInStealthMode();
        enableHapticFeedback = ss.isTactileFeedbackEnabled();
    }
@param canvas
@param leftX
@param topY
@param partOfPattern Whether this circle is part of the pattern.
android-patternview/src/main/java/com/eftimoff/patternview/PatternView.java