forked from mirror/monocles_chat_clean
make settings export directory to the same as backup directory
This commit is contained in:
parent
641676a33a
commit
d9265c1773
2 changed files with 6 additions and 4 deletions
|
@ -11,9 +11,9 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 115,
|
||||
"versionName": "1.5.4",
|
||||
"outputFile": "monocles chat-1.5.4null-git-release.apk"
|
||||
"versionCode": 116,
|
||||
"versionName": "1.5.5",
|
||||
"outputFile": "monocles chat-1.5.5null-git-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.services;
|
||||
|
||||
import static eu.siacs.conversations.persistance.FileBackend.APP_DIRECTORY;
|
||||
import static eu.siacs.conversations.services.NotificationService.EXPORT_BACKUP_NOTIFICATION_ID;
|
||||
import static eu.siacs.conversations.utils.Compatibility.runsTwentySix;
|
||||
import static eu.siacs.conversations.utils.StorageHelper.getAppLogsDirectory;
|
||||
|
@ -17,6 +18,7 @@ import android.database.DatabaseUtils;
|
|||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
import android.preference.PreferenceManager;
|
||||
|
@ -417,7 +419,7 @@ public class ExportBackupService extends Service {
|
|||
boolean success = false;
|
||||
ObjectOutputStream output = null;
|
||||
try {
|
||||
final File file = new File(getBackupDirectory(null), "settings.dat");
|
||||
final File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + File.separator + APP_DIRECTORY + File.separator + "Database" + File.separator, "settings.dat");
|
||||
output = new ObjectOutputStream(new FileOutputStream(file));
|
||||
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||
output.writeObject(pref.getAll());
|
||||
|
|
Loading…
Reference in a new issue