summaryrefslogtreecommitdiff
path: root/orgfoxttrss/src/main/java/org/fox/ttrss/util/PrefsBackupAgent.java
blob: 2b33615f3786791e5cacbb3279d5ebe5770b8213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package org.fox.ttrss.util;

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);
    }
}