private void handleUnlockOrInstall(){
  if (isFinishing()) {
    return;
  }
switch (mKeyStore.state()) {
case UNINITIALIZED:
{
      ensureKeyGuard();
      return;
    }
case LOCKED:
{
    new UnlockDialog();
    return;
  }
case UNLOCKED:
{
  if (!checkKeyGuardQuality()) {
    new ConfigureKeyGuardDialog();
    return;
  }
  installIfAvailable();
  finish();
  return;
}
}
}

private void handleUnlockOrInstall ( ) { if ( isFinishing ( ) ) { return ; } switch ( mKeyStore . state ( ) ) { case UNINITIALIZED : { ensureKeyGuard ( ) ; return ; } case LOCKED : { new UnlockDialog ( ) ; return ; } case UNLOCKED : { if ( ! checkKeyGuardQuality ( ) ) { new ConfigureKeyGuardDialog ( ) ; return ; } installIfAvailable ( ) ; finish ( ) ; return ; } } }
based on the current state of the keystore and key guard , try to make progress on unlocking or installing to the keystore .
