Compare commits

..

1 commit

Author SHA1 Message Date
038d924a99
feat: discovery 2025-03-10 09:55:19 +08:00

View file

@ -2,10 +2,11 @@ package net.typeblog.lpac_jni
import android.util.Patterns
// example address in GSMA SGP.26, some chips use addresses like this
@Suppress("SpellCheckingInspection")
val invalidDPAddresses = setOf(
"testrootsmds.example.com",
"testrootsmds.gsma.com",
"testrootsmds.example.com",
)
class EuiccConfiguredAddresses(defaultDPAddress: String?, rootDSAddress: String?) {
@ -24,6 +25,5 @@ private fun isInvalidDPAddress(address: String?): Boolean {
private fun isInvalidDSAddress(address: String?): Boolean {
if (address.isNullOrBlank()) return true
if (address in invalidDPAddresses) return true
if (Patterns.DOMAIN_NAME.matcher(address).matches()) return false
return false
return !Patterns.DOMAIN_NAME.matcher(address).matches()
}