mirror of
https://invent.kde.org/network/kdeconnect-android.git
synced 2025-10-06 00:23:01 +02:00
Regenerate device ID if the stored ID is not valid
This commit is contained in:
@@ -129,8 +129,8 @@ object DeviceHelper {
|
||||
|
||||
fun initializeDeviceId(context: Context) {
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val preferenceKeys: Set<String> = preferences.all.keys
|
||||
if (preferenceKeys.contains(KEY_DEVICE_ID_PREFERENCE)) {
|
||||
val deviceId = preferences.getString(KEY_DEVICE_ID_PREFERENCE, "")!!
|
||||
if (DeviceInfo.isValidDeviceId(deviceId)) {
|
||||
return // We already have an ID
|
||||
}
|
||||
@SuppressLint("HardwareIds")
|
||||
|
Reference in New Issue
Block a user