diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-12-08 17:42:53 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-12-08 17:42:53 -0800 |
commit | d9cf55f61b76d7d6c10fe9aa3a23d5c0b91b99dd (patch) | |
tree | 69b28eb959bb57002e0be2efb127581bb4cbac45 /app/src | |
parent | c56824f9e6fda0ad3439d55de034afe0fc612084 (diff) | |
download | dsub-d9cf55f61b76d7d6c10fe9aa3a23d5c0b91b99dd.tar.gz dsub-d9cf55f61b76d7d6c10fe9aa3a23d5c0b91b99dd.tar.bz2 dsub-d9cf55f61b76d7d6c10fe9aa3a23d5c0b91b99dd.zip |
On settings restore remove cache location since they differ from device to device
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java b/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java index 7eb6d137..9b6a20a5 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java +++ b/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java @@ -19,13 +19,22 @@ package github.daneren2005.dsub.util; import android.app.backup.BackupAgentHelper; +import android.app.backup.BackupDataInput; import android.app.backup.SharedPreferencesBackupHelper; +import android.os.ParcelFileDescriptor; + import github.daneren2005.dsub.util.Constants; public class SettingsBackupAgent extends BackupAgentHelper { + @Override public void onCreate() { super.onCreate(); SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, Constants.PREFERENCES_FILE_NAME); addHelper("mypreferences", helper); } + + @Override + public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState) { + Util.getPreferences(this).edit().remove(Constants.PREFERENCES_KEY_CACHE_LOCATION).apply(); + } } |