Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Duplicate Biometric prompts #3842

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class WebViewActivity : BaseActivity(), io.homeassistant.companion.android.webvi
private var firstAuthTime: Long = 0
private var resourceURL: String = ""
private var appLocked = true
private var unlockingApp = false
private var exoPlayer: ExoPlayer? = null
private var isExoFullScreen = false
private var exoTop = 0 // These margins are from the DOM and scaled to screen
Expand Down Expand Up @@ -1025,6 +1026,7 @@ class WebViewActivity : BaseActivity(), io.homeassistant.companion.android.webvi
}
else -> Log.d(TAG, "Authentication failed, retry attempts allowed")
}
unlockingApp = false
}

override fun onWindowFocusChanged(hasFocus: Boolean) {
Expand Down Expand Up @@ -1053,7 +1055,10 @@ class WebViewActivity : BaseActivity(), io.homeassistant.companion.android.webvi
appLocked = presenter.isAppLocked()
if (appLocked) {
binding.blurView.setBlurEnabled(true)
authenticator.authenticate(getString(commonR.string.biometric_title))
if (!unlockingApp) {
authenticator.authenticate(getString(commonR.string.biometric_title))
}
unlockingApp = true
} else {
binding.blurView.setBlurEnabled(false)
}
Expand Down