int getResId() { return mResId; }
}
- private class MigrationCleanupException extends Exception {
- MigrationCleanupException() {}
- }
-
@Override
protected Integer doInBackground(String... args) {
rollback();
Log_OC.startLogging(mStorageSource);
return e.getResId();
- } catch (MigrationCleanupException e) {
- Log_OC.w(TAG, "Migration cleanup step failed");
- Log_OC.startLogging(mStorageSource);
- return 0;
} finally {
publishProgress(mProgress++, R.string.file_migration_restoring_accounts_configuration);
restoreAccountsSyncStatus(ocAuthority, ocAccounts, oldAutoSync);
}
}
- void cleanup() throws MigrationCleanupException {
+ void cleanup() {
File srcFile = new File(mStorageSource + File.separator + MainApp.getDataFolder());
if (!srcFile.delete())
- throw new MigrationCleanupException();
+ Log_OC.w(TAG, "Migration cleanup step failed");
}
void rollback() {