Fix NPE during contacts backup

Fixes #9080

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
This commit is contained in:
Chris Narkiewicz 2021-10-25 01:59:44 +01:00
parent ea92f8432c
commit 8e5c8dd840
No known key found for this signature in database
GPG key ID: 30D28CA4CCC665C6

View file

@ -198,7 +198,9 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
final ContactsPreferenceActivity contactsPreferenceActivity = (ContactsPreferenceActivity) getActivity();
if (contactsPreferenceActivity != null) {
String backupFolderPath = getResources().getString(R.string.contacts_backup_folder) + OCFile.PATH_SEPARATOR;
refreshBackupFolder(backupFolderPath, contactsPreferenceActivity, contactsPreferenceActivity.getStorageManager());
refreshBackupFolder(backupFolderPath,
contactsPreferenceActivity.getApplicationContext(),
contactsPreferenceActivity.getStorageManager());
}
}
@ -212,7 +214,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
if (folder != null) {
RefreshFolderOperation operation = new RefreshFolderOperation(folder, System.currentTimeMillis(),
false, false, storageManager, user, getContext());
false, false, storageManager, user, context);
RemoteOperationResult result = operation.execute(user.toPlatformAccount(), context);
return result.isSuccess();