Esempio n. 1
0
 protected void doLockPatternResult(ResuleType resuleType) {
   switch (resuleType) {
     case MIN_DOTS_FAIL:
       Toast.makeText(this, "至少连接" + minWiredDots + "个点,请重试", Toast.LENGTH_SHORT).show();
       break;
     case PATTERN_CREATE:
       lockPatternView.clearPattern();
       break;
     case COMPARE_OK:
       if (lockPatternType == LockPatternType.CREATE_PATTERN) {
         finishWithResultOk(getIntent().getCharArrayExtra(EXTRA_PATTERN));
       } else {
         finishWithResultOk(null);
       }
       break;
     case COMPARE_FAIL:
       if (lockPatternType == LockPatternType.CREATE_PATTERN) {
         // not do something
       } else {
         if (retryCount >= maxRetries) {
           finishWithNegativeResult(RESULT_FAILED);
         }
       }
       break;
   }
 }
Esempio n. 2
0
 @Override
 public void run() {
   lockPatternView.clearPattern();
   onPatternCleared();
 }