mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-02 12:16:55 +01:00
toQrCodeData()
is now internal
This commit is contained in:
parent
3735ac307f
commit
16c8296735
@ -23,7 +23,7 @@ import org.matrix.android.sdk.internal.extensions.toUnsignedInt
|
||||
// MATRIX
|
||||
private val prefix = "MATRIX".toByteArray(Charsets.ISO_8859_1)
|
||||
|
||||
fun QrCodeData.toEncodedString(): String {
|
||||
internal fun QrCodeData.toEncodedString(): String {
|
||||
var result = ByteArray(0)
|
||||
|
||||
// MATRIX
|
||||
@ -67,7 +67,7 @@ fun QrCodeData.toEncodedString(): String {
|
||||
return result.toString(Charsets.ISO_8859_1)
|
||||
}
|
||||
|
||||
fun String.toQrCodeData(): QrCodeData? {
|
||||
internal fun String.toQrCodeData(): QrCodeData? {
|
||||
val byteArray = toByteArray(Charsets.ISO_8859_1)
|
||||
|
||||
// Size should be min 6 + 1 + 1 + 2 + ? + 32 + 32 + ? = 74 + transactionLength + secretLength
|
||||
|
@ -49,7 +49,6 @@ import im.vector.lib.ui.styles.debug.DebugVectorButtonStylesDarkActivity
|
||||
import im.vector.lib.ui.styles.debug.DebugVectorButtonStylesLightActivity
|
||||
import im.vector.lib.ui.styles.debug.DebugVectorTextViewDarkActivity
|
||||
import im.vector.lib.ui.styles.debug.DebugVectorTextViewLightActivity
|
||||
import org.matrix.android.sdk.internal.crypto.verification.qrcode.toQrCodeData
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -251,7 +250,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
|
||||
// renderQrCode(QrCodeScannerActivity.getResultText(data) ?: "")
|
||||
val result = QrCodeScannerActivity.getResultText(activityResult.data)!!
|
||||
|
||||
val qrCodeData = result.toQrCodeData()
|
||||
val qrCodeData = null // This is now internal: result.toQrCodeData()
|
||||
Timber.e("qrCodeData: $qrCodeData")
|
||||
|
||||
if (result.length != buffer.size) {
|
||||
@ -265,6 +264,8 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ensure developer will see that this cannot work anymore
|
||||
error("toQrCodeData() is now internal")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user