mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-28 12:47:43 +00:00
Allow hyphens in device ids
This commit is contained in:
parent
5aa6fae03b
commit
3eda9d4ef9
@ -110,7 +110,7 @@ class DeviceInfo(
|
|||||||
isValidDeviceId(getString("deviceId", ""));
|
isValidDeviceId(getString("deviceId", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
private val DEVICE_ID_REGEX = "^[a-zA-Z0-9_]{32,38}\$".toRegex()
|
private val DEVICE_ID_REGEX = "^[a-zA-Z0-9_-]{32,38}\$".toRegex()
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun isValidDeviceId(deviceId: String): Boolean = deviceId.matches(DEVICE_ID_REGEX)
|
fun isValidDeviceId(deviceId: String): Boolean = deviceId.matches(DEVICE_ID_REGEX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user