Package 

Class DeviceIdFilePersistence


  • @RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) 
    public final class DeviceIdFilePersistence
    
                        

    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.

    This file mirrors the DeviceIdFilePersistence class in bugsnag-android.

    • Method Summary

      Modifier and Type Method Description
      final String loadDeviceId(Boolean requestCreateIfDoesNotExist) Loads the device ID from its file system location.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeviceIdFilePersistence

        DeviceIdFilePersistence(File file, Function0<UUID> deviceIdGenerator)
    • Method Detail

      • loadDeviceId

         final 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.