public void setLockPatternType(LockPatternType lockPatternType) { this.lockPatternType = lockPatternType; if (lockPatternType == LockPatternType.VERIFY_CAPTCHA) { final ArrayList<LockPatternView.Cell> pattern; if (getIntent().hasExtra(EXTRA_PATTERN)) { pattern = getIntent().getParcelableArrayListExtra(EXTRA_PATTERN); } else { getIntent() .putParcelableArrayListExtra( EXTRA_PATTERN, pattern = LockPatternUtils.genCaptchaPattern(captchaWiredDots)); } lockPatternView.setPattern(LockPatternView.DisplayMode.Animate, pattern); } }
protected final void init(LockPatternView lockPatternView) { this.lockPatternView = lockPatternView; initLockPatternType(); initSettings(); initLockPatternView(); if (lockPatternType == LockPatternType.VERIFY_CAPTCHA) { final ArrayList<LockPatternView.Cell> pattern; if (getIntent().hasExtra(EXTRA_PATTERN)) { pattern = getIntent().getParcelableArrayListExtra(EXTRA_PATTERN); } else { getIntent() .putParcelableArrayListExtra( EXTRA_PATTERN, pattern = LockPatternUtils.genCaptchaPattern(captchaWiredDots)); } lockPatternView.setPattern(LockPatternView.DisplayMode.Animate, pattern); } onInit(lockPatternType); }