title: How to replace deprecated KeyGenParameterSpec.Builder.setUserAuthenticationValidityDurationSeconds?
body: <p>From android 11 setUserAuthenticationValidityDurationSeconds are deprecated in favor of setUserAuthenticationParameters inside KeyGenParameterSpec.Builder but seams there is any support for previous versions.</p>
  <p>so, what are best the solution ?</p>
  <pre><code>KeyGenParameterSpec.Builder builder = new KeyGenParameterSpec.Builder(...)
  if (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.R)
      builder.setUserAuthenticationParameters(timeout, KeyProperties.AUTH_DEVICE_CREDENTIAL | KeyProperties.AUTH_BIOMETRIC_STRONG);
  else
      //noinspection deprecation
      builder.setUserAuthenticationValidityDurationSeconds(timeout);
  </code></pre>
  <p>this one?</p>