2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-01 14:45:08 +00:00

Generate IDs with only alphanumeric values

As per https://invent.kde.org/network/kdeconnect-meta/-/merge_requests/13
This commit is contained in:
Albert Vaca Cintora
2025-03-30 20:59:32 +02:00
parent 6d66d69820
commit 0b03a66c37

View File

@@ -137,7 +137,7 @@ object DeviceHelper {
val deviceName = if (preferenceKeys.isEmpty()) { val deviceName = if (preferenceKeys.isEmpty()) {
// For new installations, use random IDs // For new installations, use random IDs
Log.i("DeviceHelper","No device ID found and this looks like a new installation, creating a random ID") Log.i("DeviceHelper","No device ID found and this looks like a new installation, creating a random ID")
UUID.randomUUID().toString().replace('-', '_') UUID.randomUUID().toString().replace("-", "")
} else { } else {
// Use the ANDROID_ID as device ID for existing installations, for backwards compatibility // Use the ANDROID_ID as device ID for existing installations, for backwards compatibility
Log.i("DeviceHelper", "No device ID found but this seems an existing installation, using the Android ID") Log.i("DeviceHelper", "No device ID found but this seems an existing installation, using the Android ID")