Browse Source

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)
Peter Cai 3 years ago
parent
commit
f2a98b4fcb

+ 1 - 1
app/src/main/java/im/angry/openeuicc/ui/ProfileDownloadFragment.kt

@@ -35,7 +35,7 @@ class ProfileDownloadFragment : DialogFragment(), EuiccFragmentMarker, Toolbar.O
     private val barcodeScannerLauncher = registerForActivityResult(ScanContract()) { result ->
         result.contents?.let { content ->
             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.profileDownloadCode.editText?.setText(components[2])
         }