diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-11-10 08:43:32 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-11-10 08:43:43 -0800 |
commit | 94ba466dd4a192362462c4364cb69f974a2ee194 (patch) | |
tree | aadfb23b5a9616f56b820dc56035f8cecd723308 /app/src/main/java | |
parent | d0de29c2c26f0c720b48a1196b27eec9f98ccd8f (diff) | |
download | dsub-94ba466dd4a192362462c4364cb69f974a2ee194.tar.gz dsub-94ba466dd4a192362462c4364cb69f974a2ee194.tar.bz2 dsub-94ba466dd4a192362462c4364cb69f974a2ee194.zip |
Clear cached session id when restoring from backup
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java | 7 |
1 files changed, 6 insertions, 1 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 def97cac..e57658c4 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java +++ b/app/src/main/java/github/daneren2005/dsub/util/SettingsBackupAgent.java @@ -21,6 +21,7 @@ package github.daneren2005.dsub.util; import android.app.backup.BackupAgentHelper; import android.app.backup.BackupDataInput; import android.app.backup.SharedPreferencesBackupHelper; +import android.content.SharedPreferences; import android.os.ParcelFileDescriptor; import java.io.IOError; @@ -39,6 +40,10 @@ public class SettingsBackupAgent extends BackupAgentHelper { @Override public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState) throws IOException{ super.onRestore(data, appVersionCode, newState); - Util.getPreferences(this).edit().remove(Constants.PREFERENCES_KEY_CACHE_LOCATION).apply(); + + SharedPreferences.Editor editor = Util.getPreferences(this).edit(); + editor.remove(Constants.PREFERENCES_KEY_CACHE_LOCATION); + editor.remove(Constants.CACHE_AUDIO_SESSION_ID); + editor.apply(); } } |