fix SPBackupAgent

This commit is contained in:
Milos Kozak 2020-05-12 00:04:09 +02:00
parent 1b625265d0
commit 1d1d57a458

View file

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