Skip to content

Commit 110fd52

Browse files
Ian BirdIanDBird
Ian Bird
authored andcommitted
Add explicit comments about local storage security
1 parent 290cc2c commit 110fd52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sdk/src/main/java/com/uid2/storage/FileStorageManager.kt

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ internal class FileStorageManager(
1818
private val ioDispatcher: CoroutineDispatcher = Dispatchers.IO,
1919
) : StorageManager {
2020

21+
// For storage, we use the parent filesDir which is part of the Application's internal storage. This internal
22+
// storage is sandboxed to prevent any other app, or even the user, from accessing it directly. We rely on Android
23+
// keeping this file secure.
24+
//
25+
// On Android 10+, this location is also likely encrypted.
26+
//
27+
// https://developer.android.com/training/data-storage/app-specific#internal-access-files
2128
constructor(context: Context) : this({ File(context.filesDir, FILE_IDENTITY) })
2229

2330
// This lazy value *should* only be requested on the ioDispatcher.

0 commit comments

Comments
 (0)