Compare commits
1 commit
038d924a99
...
24ff369911
Author | SHA1 | Date | |
---|---|---|---|
24ff369911 |
1 changed files with 3 additions and 3 deletions
|
@ -2,11 +2,10 @@ 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.gsma.com",
|
||||
"testrootsmds.example.com",
|
||||
"testrootsmds.gsma.com",
|
||||
)
|
||||
|
||||
class EuiccConfiguredAddresses(defaultDPAddress: String?, rootDSAddress: String?) {
|
||||
|
@ -25,5 +24,6 @@ private fun isInvalidDPAddress(address: String?): Boolean {
|
|||
private fun isInvalidDSAddress(address: String?): Boolean {
|
||||
if (address.isNullOrBlank()) return true
|
||||
if (address in invalidDPAddresses) return true
|
||||
return !Patterns.DOMAIN_NAME.matcher(address).matches()
|
||||
if (Patterns.DOMAIN_NAME.matcher(address).matches()) return false
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue