mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-23 04:11:29 +00:00
Backup pref related fixes.
This commit is contained in:
parent
e0892853a7
commit
bf666f0296
@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="pref_backup_enabled"
|
android:key="pref_backup_enabled_v2"
|
||||||
android:title="@string/preferences_chats__chat_backups"
|
android:title="@string/preferences_chats__chat_backups"
|
||||||
android:summary="@string/preferences_chats__backup_chats_to_external_storage" />
|
android:summary="@string/preferences_chats__backup_chats_to_external_storage" />
|
||||||
|
|
||||||
@ -102,7 +102,7 @@
|
|||||||
android:key="pref_backup_create"
|
android:key="pref_backup_create"
|
||||||
android:title="@string/preferences_chats__create_backup"
|
android:title="@string/preferences_chats__create_backup"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:dependency="pref_backup_enabled"
|
android:dependency="pref_backup_enabled_v2"
|
||||||
tools:summary="Last backup: 3 days ago" />
|
tools:summary="Last backup: 3 days ago" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
@ -40,7 +40,7 @@ object BackupUtil {
|
|||||||
@Throws(IOException::class)
|
@Throws(IOException::class)
|
||||||
fun enableBackups(context: Context, password: String) {
|
fun enableBackups(context: Context, password: String) {
|
||||||
val backupDir = getBackupDirUri(context)
|
val backupDir = getBackupDirUri(context)
|
||||||
if (backupDir == null || validateDirAccess(context, backupDir)) {
|
if (backupDir == null || !validateDirAccess(context, backupDir)) {
|
||||||
throw IOException("Backup dir is not set or invalid.")
|
throw IOException("Backup dir is not set or invalid.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user