fix SPBackupAgent
This commit is contained in:
parent
1b625265d0
commit
1d1d57a458
1 changed files with 3 additions and 5 deletions
|
@ -5,13 +5,11 @@ import android.app.backup.SharedPreferencesBackupHelper;
|
||||||
|
|
||||||
public class SPBackupAgent extends BackupAgentHelper {
|
public class SPBackupAgent extends BackupAgentHelper {
|
||||||
|
|
||||||
// API 24
|
|
||||||
final String PREFS = getApplicationContext().getPackageName() + "_preferences";
|
|
||||||
|
|
||||||
final String PREFS_BACKUP_KEY = "SP";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
|
// API 24
|
||||||
|
final String PREFS = getApplicationContext().getPackageName() + "_preferences";
|
||||||
|
final String PREFS_BACKUP_KEY = "SP";
|
||||||
SharedPreferencesBackupHelper helper =
|
SharedPreferencesBackupHelper helper =
|
||||||
new SharedPreferencesBackupHelper(this, PREFS);
|
new SharedPreferencesBackupHelper(this, PREFS);
|
||||||
addHelper(PREFS_BACKUP_KEY, helper);
|
addHelper(PREFS_BACKUP_KEY, helper);
|
||||||
|
|
Loading…
Reference in a new issue