mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 06:02:22 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user