From 6452a95e0a19d84c3fb898541c033e000be576ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artjom=20K=C3=B6nig?= Date: Mon, 22 Aug 2022 13:36:53 +0200 Subject: [PATCH] clean up pin code and biometrics on logout --- changelog.d/6906.bugfix | 1 + .../src/main/java/im/vector/app/features/MainActivity.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelog.d/6906.bugfix diff --git a/changelog.d/6906.bugfix b/changelog.d/6906.bugfix new file mode 100644 index 0000000000..9b6a76f5cb --- /dev/null +++ b/changelog.d/6906.bugfix @@ -0,0 +1 @@ +Delete pin code key and the key used for biometrics authentication on logout diff --git a/vector/src/main/java/im/vector/app/features/MainActivity.kt b/vector/src/main/java/im/vector/app/features/MainActivity.kt index 14fae80325..cb77911314 100644 --- a/vector/src/main/java/im/vector/app/features/MainActivity.kt +++ b/vector/src/main/java/im/vector/app/features/MainActivity.kt @@ -41,9 +41,10 @@ import im.vector.app.features.analytics.VectorAnalytics 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 @@ -133,10 +134,11 @@ class MainActivity : VectorBaseActivity(), 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(), UnlockedActivity vectorPreferences.clearPreferences() uiStateRepository.reset() pinLocker.unlock() - pinCodeStore.deletePinCode() + pinCodeHelper.deletePinCode() vectorAnalytics.onSignOut() vectorSessionStore.clear() + lockScreenKeyRepository.deleteSystemKey() } withContext(Dispatchers.IO) { // On BG thread