Minor code cleanups
This commit is contained in:
@@ -172,17 +172,14 @@ class Account(val accp: String) {
|
|||||||
|
|
||||||
fun removeAudioCodecs(codecModule: String) {
|
fun removeAudioCodecs(codecModule: String) {
|
||||||
when (codecModule) {
|
when (codecModule) {
|
||||||
"g711" -> {
|
"g711" ->
|
||||||
removeAudioCodecsStartingWith("pcm")
|
removeAudioCodecsStartingWith("pcm")
|
||||||
}
|
"g722" ->
|
||||||
"g722" -> {
|
|
||||||
removeAudioCodecsStartingWith("g722/")
|
removeAudioCodecsStartingWith("g722/")
|
||||||
}
|
else ->
|
||||||
else -> {
|
|
||||||
removeAudioCodecsStartingWith(codecModule)
|
removeAudioCodecsStartingWith(codecModule)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@@ -220,7 +217,7 @@ class Account(val accp: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun checkAuthPass(ap: String): Boolean {
|
fun checkAuthPass(ap: String): Boolean {
|
||||||
return (ap.length > 0) && (ap.length <= 64) &&
|
return (ap.isNotEmpty()) && (ap.length <= 64) &&
|
||||||
Regex("^[ -~]*\$").matches(ap) && !ap.contains('"')
|
Regex("^[ -~]*\$").matches(ap) && !ap.contains('"')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user