private void saveSecretAndRefreshUserList(
      AccountIndex index, String secret, OtpType type, Integer counter) {
    if (saveSecret(this, index, secret, type, counter)) {
      updateFirstAccountAddedNoticeDisplay();
      refreshView(true);
    }
  }
Saves the secret key to local storage on the phone and updates the displayed account list.

@param index the intended {@link AccountIndex} to update/add
@param secret the secret key
@param type hotp vs totp
@param counter only important for the hotp type
java/com/google/android/apps/authenticator/AuthenticatorActivity.java