Add note to auto-restore setting in case removable storage is used

This warns the user that auto-restore will only work when their storage
is plugged in.
This commit is contained in:
Torsten Grote 2020-01-03 09:34:15 -03:00
parent 22be36e2a7
commit 43184f4d23
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF
2 changed files with 8 additions and 1 deletions

View file

@ -180,6 +180,12 @@ class SettingsFragment : PreferenceFragmentCompat() {
activity?.contentResolver?.let {
autoRestore.isChecked = Settings.Secure.getInt(it, BACKUP_AUTO_RESTORE, 1) == 1
}
if (storage?.isUsb == true) {
autoRestore.summary = getString(R.string.settings_auto_restore_summary) + "\n\n" +
getString(R.string.settings_auto_restore_summary_usb)
} else {
autoRestore.setSummary(R.string.settings_auto_restore_summary)
}
}
private fun setBackupLocationSummary(lastBackupInMillis: Long) {

View file

@ -17,7 +17,8 @@
<string name="settings_backup_location_summary">%1$s · Last Backup %2$s</string>
<string name="settings_info">All backups are encrypted on your phone. To restore from backup you will need your 12-word recovery code.</string>
<string name="settings_auto_restore_title">Automatic restore</string>
<string name="settings_auto_restore_summary">When reinstalling an app, restore backed up settings and data</string>
<string name="settings_auto_restore_summary">When reinstalling an app, restore backed up settings and data.</string>
<string name="settings_auto_restore_summary_usb">Note: Your USB flash drive needs to be plugged in for this to work.</string>
<string name="settings_backup_apk_title">App backup</string>
<string name="settings_backup_apk_summary">Back up the apps themselves. Otherwise, only app data would get backed up.</string>
<string name="settings_backup_apk_dialog_title">Really disable app backup?</string>