DeviceProtectedDataStoreFile
Added in 1.2.0
public final class DeviceProtectedDataStoreFile
Summary
Public methods |
|
|---|---|
static final @NonNull File |
@RequiresApi(value = 24)Generate the File object for DataStore for use during direct boot. |
Public methods
deviceProtectedDataStoreFile
@RequiresApi(value = 24)
public static final @NonNull File deviceProtectedDataStoreFile(
@NonNull Context receiver,
@NonNull String fileName
)
Generate the File object for DataStore for use during direct boot. If the provided context is a user encrypted context, it is converted to a DeviceProtectedStorageContext via Context.createDeviceProtectedStorageContext.
The file is generated by calling File(deviceProtectedContext.filesDir, "datastore/$fileName").
Do NOT use the file outside of DataStore.
The context used to get the files directory @fileName the file name