Skip to content

Commit

Permalink
Fix app lock 'retry' unlocking app (home-assistant#3507)
Browse files Browse the repository at this point in the history
- Only change the time for when the session expires if the app is in use, otherwise the new session expires timestamp might unlock the app
  • Loading branch information
jpelgrom authored May 13, 2023
1 parent 8b32f9b commit 8704213
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class IntegrationRepositoryImpl @AssistedInject constructor(
}

override suspend fun setAppActive(active: Boolean) {
if (!active) {
if (!active && appActive) {
setSessionExpireMillis(System.currentTimeMillis() + (getSessionTimeOut() * 1000) + APPLOCK_TIMEOUT_GRACE_MS)
}
Log.d(TAG, "setAppActive(): $active")
Expand Down

0 comments on commit 8704213

Please sign in to comment.