title: Biometric Authentication fails after app updates
body: <p>So, i've implemented biometric authentication in my app using AndroidX.BiometricPrompt system it works fine, but when the app updates from GooglePlay, the biometric login gets invalid.</p>
  <ul>
  <li>The user data is saved in a SQLite table, was not my choice, its a boss demand;</li>
  <li>When the user inserts his login/password for the first time it shows a prompt with a switch that changes a bool &quot;isBiometricAuthorized&quot; on the db to true and it binds the login with the device biometric credentials if the user wants to;</li>
  <li>Theres no migrations related to the user data and im not sure if after the app updates from GooglePlay it cleans its caches automatically.</li>
  </ul>
  <pre class="lang-kotlin prettyprint-override"><code> 
      private lateinit var executor: Executor
      private lateinit var biometricPrompt: BiometricPrompt
      private lateinit var promptInfo: BiometricPrompt.PromptInfo
  
          executor = ContextCompat.getMainExecutor(this)
          biometricPrompt = BiometricPrompt(this, executor,
              object : BiometricPrompt.AuthenticationCallback() {
                  override fun onAuthenticationSucceeded(
                      result: BiometricPrompt.AuthenticationResult) {
                      super.onAuthenticationSucceeded(result)
                      startLogin(null, true)
                  }
  
                  override fun onAuthenticationFailed() {
                      super.onAuthenticationFailed()
                      Toast.makeText(applicationContext, &quot;Authentication Failed&quot;, Toast.LENGTH_SHORT).show()
                  }
              })
  
   private fun getCancellationSignal() : CancellationSignal {
          cancellationSignal = CancellationSignal()
          cancellationSignal?.setOnCancelListener {
              Toast.makeText(applicationContext, &quot;Canceled by the user&quot;, Toast.LENGTH_SHORT).show()
          }
          return  cancellationSignal as CancellationSignal
      }
  
      private fun checkBiometricSupport() : Boolean {
          var canAuthenticate = true
          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
              if (Build.VERSION.SDK_INT &lt; 29) {
                  val keyguardManager : KeyguardManager = applicationContext.getSystemService(KEYGUARD_SERVICE) as KeyguardManager
                  val packageManager : PackageManager   = applicationContext.packageManager
                  if(!packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
                      canAuthenticate = false
                  }
                  if (!keyguardManager.isKeyguardSecure) {
                      canAuthenticate = false
                  }
              } else {
                  canAuthenticate = true
              }
          }else{
              canAuthenticate = false
          }
          return canAuthenticate
      }
  
  
      private fun startBioLogin() {
          UiHelper.hideSoftKeyboard(this)
          promptInfo = BiometricPrompt.PromptInfo.Builder()
              .setTitle(&quot;Biometric Authentication&quot;)
              .setSubtitle(&quot;How you wish to authenticate?&quot;)
              .setDescription(&quot;Its the fastest way to acess the system&quot;)
              .setNegativeButtonText(&quot;Cancel&quot;)
              .build()
  
          biometricPrompt.authenticate(promptInfo)
      }
  </code></pre>