-
- All Implemented Interfaces:
-
com.bugsnag.android.DeviceIdPersistence
public final class DeviceIdFilePersistence implements DeviceIdPersistence
This class is responsible for persisting and retrieving a device ID to a file.
This class is made multi-process safe through the use of a FileLock, and thread safe through the use of a ReadWriteLock in SynchronizedStreamableStore.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDeviceIdFilePersistence.Companion
-
Constructor Summary
Constructors Constructor Description DeviceIdFilePersistence(File file, Function0<UUID> deviceIdGenerator, Logger logger)
-
Method Summary
Modifier and Type Method Description StringloadDeviceId(Boolean requestCreateIfDoesNotExist)Loads the device ID from its file system location. -
-
Method Detail
-
loadDeviceId
String loadDeviceId(Boolean requestCreateIfDoesNotExist)
Loads the device ID from its file system location. If no value is present then a UUID will be generated and persisted.
-
-
-
-