mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
Add support for participating in Android's backup system
This adds an option for participating in Android's backup system. Two items are backed up: the ``files/aegis.json`` file and the entire ``shared_prefs`` directory. The option is disabled by default and can only be enabled if encryption is enabled as well. I tested this with Local Transport and Seedvault. To test with Local Transport, see: https://developer.android.com/guide/topics/data/testingbackup.
This commit is contained in:
parent
07c768893a
commit
f080eaa8f9
10 changed files with 199 additions and 23 deletions
|
@ -164,6 +164,14 @@ public class Preferences {
|
|||
return new Locale(parts[0], parts[1]);
|
||||
}
|
||||
|
||||
public boolean isAndroidBackupsEnabled() {
|
||||
return _prefs.getBoolean("pref_android_backups", false);
|
||||
}
|
||||
|
||||
public void setIsAndroidBackupsEnabled(boolean enabled) {
|
||||
_prefs.edit().putBoolean("pref_android_backups", enabled).apply();
|
||||
}
|
||||
|
||||
public boolean isBackupsEnabled() {
|
||||
return _prefs.getBoolean("pref_backups", false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue