@Test public void onActivityResult() { activity.onActivityResult(LocationSettingsActivity.REQUEST_CODE_RESOLUTION, Activity.RESULT_OK, null); verify(activity).setResolutionResultAndFinish(Activity.RESULT_OK); }
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_RESOLUTION) { setResolutionResultAndFinish(resultCode); } else { setResolutionResultAndFinish(Activity.RESULT_CANCELED); } }
LocationSettingsActivity extends Activity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_RESOLUTION) { setResolutionResultAndFinish(resultCode); } else { setResolutionResultAndFinish(Activity.RESULT_CANCELED); } } }
LocationSettingsActivity extends Activity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_RESOLUTION) { setResolutionResultAndFinish(resultCode); } else { setResolutionResultAndFinish(Activity.RESULT_CANCELED); } }  }
LocationSettingsActivity extends Activity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_RESOLUTION) { setResolutionResultAndFinish(resultCode); } else { setResolutionResultAndFinish(Activity.RESULT_CANCELED); } }   }
LocationSettingsActivity extends Activity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_RESOLUTION) { setResolutionResultAndFinish(resultCode); } else { setResolutionResultAndFinish(Activity.RESULT_CANCELED); } }    }