To avoid unnecessary nesting you can rewrite if statement next way.
```if (bundle == null) {
    return;
}
int resultCode = bundle.getInt(PiCalculateService.RESULT_KEY);  
// the rest of previous if body
```