Remove the ability to save backups to the external SD card.

The directory we were previously saving backups to on the external SD
card is actually deleted upon app uninstall and/or clearing the app's
data. There's also no reliable way to write to the root of an external
SD card (that isn't comically inconvenient), so for now it's safer if we
just move back to getting the regular 'ol standard external storage
directory (which is likely internal storage, despite its name).

Fixes #7845
This commit is contained in:
Greyson Parrelli
2018-06-28 17:38:59 -07:00
parent 290b184491
commit 18756aedf6
5 changed files with 13 additions and 43 deletions

View File

@@ -52,7 +52,7 @@ public class LocalBackupJob extends ContextJob {
try {
String backupPassword = TextSecurePreferences.getBackupPassphrase(context);
File backupDirectory = StorageUtil.getBackupDirectory(context);
File backupDirectory = StorageUtil.getBackupDirectory();
String timestamp = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.US).format(new Date());
String fileName = String.format("signal-%s.backup", timestamp);
File backupFile = new File(backupDirectory, fileName);
@@ -78,7 +78,7 @@ public class LocalBackupJob extends ContextJob {
throw new IOException("Renaming temporary backup file failed!");
}
BackupUtil.deleteOldBackups(context);
BackupUtil.deleteOldBackups();
} finally {
GenericForegroundService.stopForegroundTask(context);
}