Activation codes can contain more than 3 components

...although we are only concerned with the first two. Evene when there
is confirmation code enforcement, the SM-DP+ server will inform us of it
(although this is not implemented yet by us)
This commit is contained in:
Peter Cai 2022-05-03 19:04:57 -04:00
parent 3013609ff5
commit f2a98b4fcb
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class ProfileDownloadFragment : DialogFragment(), EuiccFragmentMarker, Toolbar.O
private val barcodeScannerLauncher = registerForActivityResult(ScanContract()) { result -> private val barcodeScannerLauncher = registerForActivityResult(ScanContract()) { result ->
result.contents?.let { content -> result.contents?.let { content ->
val components = content.split("$") val components = content.split("$")
if (components.size != 3 || components[0] != "LPA:1") return@registerForActivityResult if (components.size < 3 || components[0] != "LPA:1") return@registerForActivityResult
binding.profileDownloadServer.editText?.setText(components[1]) binding.profileDownloadServer.editText?.setText(components[1])
binding.profileDownloadCode.editText?.setText(components[2]) binding.profileDownloadCode.editText?.setText(components[2])
} }