summaryrefslogtreecommitdiff
path: root/src/org/fox/ttrss/PrefsBackupAgent.java
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>2011-12-19 14:08:59 +0300
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>2011-12-19 14:08:59 +0300
commitadf1750387f5819318934f17d30c8ccba16b849c (patch)
treec66c9dd6567369117f6020460f5dc37e7c34f497 /src/org/fox/ttrss/PrefsBackupAgent.java
parenteb2d8f4ad590a6e08c8c8745dec112eed64fa2a2 (diff)
parent288d90c4b0dd873315e464b98f96c42c5960ada2 (diff)
Merge branch 'master' of git@github.com:gothfox/Tiny-Tiny-RSS-for-Honeycomb.git
Diffstat (limited to 'src/org/fox/ttrss/PrefsBackupAgent.java')
-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);
+ }
+}