aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
diff options
context:
space:
mode:
authorpacien2020-12-08 16:04:48 +0100
committerpacien2020-12-08 16:04:48 +0100
commit69445bffe7a17055ac47a41df5d33fe09b9aff3c (patch)
tree61a00dfe1c0d3085386f40c0c0d8c8cbb427a33b /app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
parent9c0aa8bd9dc694854b5c4b5eb07ef4d8942709a8 (diff)
downloadtincapp-69445bffe7a17055ac47a41df5d33fe09b9aff3c.tar.gz
context: read configuration from and write logs and temp files to private app storage
The external app public storage directory is no longer reliably accessible on Android 11 and above. This makes editing the configuration and accessing the log files impossible in some cases. Let's move to the app private storage, to be made accessible to the user by some other mean. This has the benefit of also protecting the private keys that need to be stored encrypted otherwise. We also split the configuration and cache directory into specialised sub-directories. GitHub: related to #103
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt')
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt b/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
index 89bb246..7d534e6 100644
--- a/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
+++ b/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
@@ -43,7 +43,7 @@ object TincKeyring {
43 } 43 }
44 44
45 private fun tempKey(name: String): File { 45 private fun tempKey(name: String): File {
46 val file = File(AppPaths.internalCacheDir(), name) 46 val file = File(AppPaths.runtimeDir(), name)
47 file.createNewFile() 47 file.createNewFile()
48 file.deleteOnExit() 48 file.deleteOnExit()
49 file.makePrivate() 49 file.makePrivate()