mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Regenerate device ID if the stored ID is not valid
This commit is contained in:
parent
e10f2496de
commit
28070954a6
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user