Merge pull request #1240 from vector-im/feature/update_security_notice

Feature/update security notice
This commit is contained in:
Valere 2020-04-16 15:33:54 +02:00 committed by GitHub
commit 614127e46b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -82,6 +82,7 @@ import im.vector.matrix.android.internal.di.DeviceId
import im.vector.matrix.android.internal.di.UserId
import im.vector.matrix.android.internal.session.SessionScope
import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import timber.log.Timber
@ -102,7 +103,8 @@ internal class DefaultVerificationService @Inject constructor(
private val coroutineDispatchers: MatrixCoroutineDispatchers,
private val verificationTransportRoomMessageFactory: VerificationTransportRoomMessageFactory,
private val verificationTransportToDeviceFactory: VerificationTransportToDeviceFactory,
private val crossSigningService: CrossSigningService
private val crossSigningService: CrossSigningService,
private val cryptoCoroutineScope: CoroutineScope
) : DefaultVerificationTransaction.Listener, VerificationService {
private val uiHandler = Handler(Looper.getMainLooper())
@ -125,7 +127,7 @@ internal class DefaultVerificationService @Inject constructor(
// Event received from the sync
fun onToDeviceEvent(event: Event) {
GlobalScope.launch(coroutineDispatchers.crypto) {
cryptoCoroutineScope.launch(coroutineDispatchers.crypto) {
when (event.getClearType()) {
EventType.KEY_VERIFICATION_START -> {
onStartRequestReceived(event)

View file

@ -102,7 +102,7 @@ class HomeDetailFragment @Inject constructor(
VerificationVectorAlert(
uid = uid,
title = getString(R.string.new_session),
description = getString(R.string.new_session_review),
description = getString(R.string.new_session_review_with_info, newest.displayName ?: "", newest.deviceId ?: ""),
iconId = R.drawable.ic_shield_warning
).apply {
matrixItem = user

View file

@ -2202,7 +2202,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming
<string name="refresh">Refresh</string>
<string name="new_session">New Session</string>
<string name="new_session">Unverified login. Was this you?</string>
<string name="new_session_review">Tap to review &amp; verify</string>
<string name="verify_new_session_notice">Use this session to verify your new one, granting it access to encrypted messages.</string>
<string name="verify_new_session_was_not_me">This wasnt me</string>

View file

@ -28,6 +28,8 @@
<string name="bootstrap_progress_generating_ssss_with_info">Generating SSSS key from passphrase (%s)</string>
<string name="bootstrap_progress_generating_ssss_recovery">Generating SSSS key from recovery key</string>
<string name="bootstrap_progress_storing_in_sss">Storing keybackup secret in SSSS</string>
<!-- To produce things like 'RiotX Android (IQDHUVJTTV)' -->
<string name="new_session_review_with_info">%1$s (%2$s)</string>
<!-- END Strings added by Valere -->