Enable backup manager before restore if it's disabled

This commit is contained in:
Steve Soltys 2018-01-30 00:05:24 -05:00
parent c95655aa3a
commit bf177535e3

View file

@ -38,6 +38,10 @@ public class BackupManagerController {
backupManager.selectBackupTransport(BACKUP_TRANSPORT); backupManager.selectBackupTransport(BACKUP_TRANSPORT);
} }
if (!backupManager.isBackupEnabled()) {
backupManager.setBackupEnabled(true);
}
BackupSession backupSession = new BackupSession(backupManager, observer, packages); BackupSession backupSession = new BackupSession(backupManager, observer, packages);
backupSession.start(); backupSession.start();
return backupSession; return backupSession;
@ -49,6 +53,10 @@ public class BackupManagerController {
backupManager.selectBackupTransport(BACKUP_TRANSPORT); backupManager.selectBackupTransport(BACKUP_TRANSPORT);
} }
if (!backupManager.isBackupEnabled()) {
backupManager.setBackupEnabled(true);
}
RestoreSession restoreSession = new RestoreSession(backupManager, observer, packages); RestoreSession restoreSession = new RestoreSession(backupManager, observer, packages);
restoreSession.start(); restoreSession.start();
return restoreSession; return restoreSession;