Merge pull request #6906 from bwi-de/develop

Clean up pin code key and biometrics key on logout
This commit is contained in:
Benoit Marty 2022-10-04 16:19:03 +02:00 committed by GitHub
commit ca6813b5d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

1
changelog.d/6906.bugfix Normal file
View File

@ -0,0 +1 @@
Delete pin code key and the key used for biometrics authentication on logout

View File

@ -42,9 +42,10 @@ import im.vector.app.features.analytics.plan.ViewRoom
import im.vector.app.features.home.HomeActivity
import im.vector.app.features.home.ShortcutsHandler
import im.vector.app.features.notifications.NotificationDrawerManager
import im.vector.app.features.pin.PinCodeStore
import im.vector.app.features.pin.PinLocker
import im.vector.app.features.pin.UnlockedActivity
import im.vector.app.features.pin.lockscreen.crypto.LockScreenKeyRepository
import im.vector.app.features.pin.lockscreen.pincode.PinCodeHelper
import im.vector.app.features.popup.PopupAlertManager
import im.vector.app.features.session.VectorSessionStore
import im.vector.app.features.settings.VectorPreferences
@ -134,10 +135,11 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
@Inject lateinit var vectorPreferences: VectorPreferences
@Inject lateinit var uiStateRepository: UiStateRepository
@Inject lateinit var shortcutsHandler: ShortcutsHandler
@Inject lateinit var pinCodeStore: PinCodeStore
@Inject lateinit var pinCodeHelper: PinCodeHelper
@Inject lateinit var pinLocker: PinLocker
@Inject lateinit var popupAlertManager: PopupAlertManager
@Inject lateinit var vectorAnalytics: VectorAnalytics
@Inject lateinit var lockScreenKeyRepository: LockScreenKeyRepository
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -284,9 +286,10 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
vectorPreferences.clearPreferences()
uiStateRepository.reset()
pinLocker.unlock()
pinCodeStore.deletePinCode()
pinCodeHelper.deletePinCode()
vectorAnalytics.onSignOut()
vectorSessionStore.clear()
lockScreenKeyRepository.deleteSystemKey()
}
withContext(Dispatchers.IO) {
// On BG thread