Pin code: user has to enter pin code twice (#2005)

This commit is contained in:
Benoit Marty 2020-09-23 21:42:30 +02:00 committed by Benoit Marty
parent 299bcc2bc7
commit dfa0308db6
3 changed files with 9 additions and 5 deletions

View File

@ -20,6 +20,7 @@ Bugfix 🐛:
- Manual import of Megolm keys does back up the imported keys
- Auto scrolling to the latest message when sending (#2094)
- Fix incorrect permission check when creating widgets (#2137)
- Pin code: user has to enter pin code twice (#2005)
Translations 🗣:
-

View File

@ -218,9 +218,7 @@
<activity android:name=".features.terms.ReviewTermsActivity" />
<activity android:name=".features.widgets.WidgetActivity" />
<activity
android:name=".features.pin.PinActivity"
android:launchMode="singleTop" />
<activity android:name=".features.pin.PinActivity" />
<!-- Services -->

View File

@ -320,10 +320,15 @@ abstract class VectorBaseActivity : AppCompatActivity(), HasScreenInjector {
Activity.RESULT_OK -> {
Timber.v("Pin ok, unlock app")
pinLocker.unlock()
// Cancel any new started PinActivity, after a screen rotation for instance
finishActivity(PinActivity.PIN_REQUEST_CODE)
}
else -> {
// Remove the task, to be sure that PIN code will be requested when resumed
finishAndRemoveTask()
if (pinLocker.getLiveState().value != PinLocker.State.UNLOCKED) {
// Remove the task, to be sure that PIN code will be requested when resumed
finishAndRemoveTask()
}
}
}
}