summaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-12-16 20:57:21 +0300
committerAndrew Dolgov <[email protected]>2011-12-16 20:57:21 +0300
commit7f986769574b75239a5ac3ae54fd67202d61d89c (patch)
tree6c87737db02676a80de287da0cb51a9be2adf405 /src/org
parent80a234cc15fb1e5dba088a17b3876bc62b8a7c0d (diff)
implement cloud settings backup
Diffstat (limited to 'src/org')
-rw-r--r--src/org/fox/ttrss/PrefsBackupAgent.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/org/fox/ttrss/PrefsBackupAgent.java b/src/org/fox/ttrss/PrefsBackupAgent.java
new file mode 100644
index 00000000..0a7e5dec
--- /dev/null
+++ b/src/org/fox/ttrss/PrefsBackupAgent.java
@@ -0,0 +1,19 @@
+package org.fox.ttrss;
+
+import android.app.backup.BackupAgentHelper;
+import android.app.backup.SharedPreferencesBackupHelper;
+
+public class PrefsBackupAgent extends BackupAgentHelper {
+ // The name of the SharedPreferences file
+ static final String PREFS = "org.fox.ttrss_preferences";
+
+ // A key to uniquely identify the set of backup data
+ static final String PREFS_BACKUP_KEY = "prefs";
+
+ // Allocate a helper and add it to the backup agent
+ @Override
+ public void onCreate() {
+ SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(this, PREFS);
+ addHelper(PREFS_BACKUP_KEY, helper);
+ }
+}