I want to be able to send back data from Activity 2 to Activity 1 using either the back button or the action bar home button. 

Here is how I've set up my back button in Activity 2:

```
@Override public void onBackPressed() {
    String[] userArray = getIntent().getExtras().getStringArray("userArray");
    Log.d("Returning user data:", Arrays.toString(userArray));
    Intent intent = new Intent();
    intent.putExtra("userArray", userArray);
    setResult(RESULT_OK, intent);
    finish();
}

```

And here is how I am receiving it in Activity 1:

```
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == 1) {
        if(resultCode == getActivity().RESULT_OK){
            String[] userArray = data.getExtras().getStringArray("userArray");
            Log.d("Retained user data:", Arrays.toString(userArray));
}}}

```

Here is how I tried setting up my home selection in Activity 2:

```
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    if (id == android.R.id.home){
        Toast.makeText(getApplicationContext(), "Saving User Info", Toast.LENGTH_SHORT).show();
        super.onBackPressed();
    }

    return super.onOptionsItemSelected(item);
}

```

The weird thing is - the toast works, but calling the onbackpressed function does not. Any suggestions?