Try to decode QrCode data in the debug Activity

This commit is contained in:
Benoit Marty 2020-02-27 11:32:59 +01:00
parent 9c7f5251b0
commit 6e060f63c6
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import android.os.Build
import androidx.core.app.NotificationCompat
import androidx.core.app.Person
import butterknife.OnClick
import im.vector.matrix.android.internal.crypto.verification.qrcode.toQrCodeData
import im.vector.riotx.R
import im.vector.riotx.core.di.ActiveSessionHolder
import im.vector.riotx.core.di.ScreenComponent
@ -209,6 +210,9 @@ class DebugMenuActivity : VectorBaseActivity() {
// renderQrCode(QrCodeScannerActivity.getResultText(data) ?: "")
val result = QrCodeScannerActivity.getResultText(data)!!
val qrCodeData = result.toQrCodeData()
Timber.e("qrCodeData: $qrCodeData")
if (result.length != buffer.size) {
Timber.e("Error, length are not the same")
} else {