Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #1163 - Restoring backup crash. #1164

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ public void onRequestPermissionsResult(
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_RESTORE_BACKUP) {
BackupUtils.restore(this, data.getData());
if(data != null){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is super-nitpicky, but please watch your spacing:

if (data != null) {

You might also consider combining your control flow statements, either as

requestCode == REQUEST_CODE_RESTORE_BACKUP && data != null

or as

requestCode != REQUEST_CODE_RESTORE_BACKUP || data == null

for an early return.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is a much better thanks for correcting me !

BackupUtils.restore(this, data.getData());
}
}
}

Expand Down
Loading