setResult doesn't call onActivityResult
<p>I have two activities which starts the same sub-activity for result.
But in only one of them onActivityResult works.<br>
Here are parts of my code</p>

<p>This is my first Activity. As you can see it calls NewCommentActivity in startActivityForResult and this part works fine  </p>

<pre><code>public class OfferActivity extends ListActivity implements View.OnClickListener {

...

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.offer_menu_comment:
            Intent commentIntent = new Intent(this, NewCommentActivity.class);
            commentIntent.putExtra(Offer.OFFER, offer);
            startActivityForResult(commentIntent, COMMENT_REQUEST_CODE);
            return true;

       ...

        default:
            return super.onOptionsItemSelected(item);
    }
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    switch (requestCode) {
        case COMMENT_REQUEST_CODE:
            if (resultCode == RESULT_OK) {
                Integer commentCnt = offer.getCommentCnt() + 1;
                offer.setCommentCnt(commentCnt);
                commentButton.setText(getString(R.string.offer_comments, offer.getCommentCnt()));
            }
            break;
    }
}

...

}
</code></pre>

<p>Here is my second activity which calls NewCommentActivity too, but here onActivityResult is not called</p>

<pre><code>public class CommentsActivity extends ListActivity{

...

 @Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        ...
        case COMMENT_ITEM_ID:
            Intent commentIntent = new Intent(this, NewCommentActivity.class);
            commentIntent.putExtra(Offer.OFFER, offer);
            startActivityForResult(commentIntent, COMMENT_REQUEST_CODE);
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    switch (requestCode) {
        case COMMENT_REQUEST_CODE:
            if (resultCode == RESULT_OK) {
                Integer commentCnt = offer.getCommentCnt() + 1;
                offer.setCommentCnt(commentCnt);
                Comment comment = data.getParcelableExtra(Comment.COMMENT);
                commentImageListAdapter.addItemAtFront(comment);
            }
            break;
    }
}

...

}
</code></pre>

<p>And here is code for NewCommentActivity : </p>

<pre><code>public class NewCommentActivity extends Activity implements View.OnClickListener {
private static final String TAG = "Gift/NewCommentActivity";
private Offer offer;
private EditText editText;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.new_comment);
    offer = getIntent().getParcelableExtra(Offer.OFFER);

    editText = (EditText) findViewById(R.id.new_comment_text);

    Button button = (Button) findViewById(R.id.new_comment_button);
    button.setOnClickListener(this);
}

@Override
public void onClick(View view) {
    if (editText.getText().length() &gt; 0) {
        new AddCommentAsyncTask().execute(offer, editText.getText().toString());
    }
}

private class AddCommentAsyncTask extends AsyncTask&lt;Object, Void, Comment&gt; {
    private String errorString;
    private ProgressDialog progressDialog;

    @Override
    protected Comment doInBackground(Object... objects) {
        Offer offer = (Offer) objects[0];
        String text = (String) objects[1];
        Comment comment = null;
        try {
            comment = ServiceContainer.getService().addComment(offer, text);
        } catch (OfferException e) {
            Log.e(TAG, "exception in comment", e);
            int id;
            if ((id = e.getErrorStringId()) != -1) {
                errorString = getString(id);
            } else {
                errorString = e.getLocalizedMessage();
            }
            cancel(false);
        }
        return comment;
    }

    @Override
    protected void onPreExecute() {
        progressDialog = Utils.newSpinnerDialog(NewCommentActivity.this, R.string.sending);
    }

    @Override
    protected void onCancelled() {
        progressDialog.dismiss();

        AlertDialog.Builder builder = Utils.newAlertDialog(NewCommentActivity.this, errorString, true);
        builder.setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                dialogInterface.dismiss();
                new AddCommentAsyncTask().execute(offer, editText.getText().toString());
            }
        })
                .setNegativeButton(R.string.dialog_cancel, new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        dialogInterface.dismiss();
                        setResult(RESULT_CANCELED);
                        finish();
                    }
                })
                .create()
                .show();
    }

    @Override
    protected void onPostExecute(Comment comment) {
        progressDialog.dismiss();

        Intent intent = new Intent();
        intent.putExtra(Comment.COMMENT, comment);
        setResult(RESULT_OK, intent);
        finish();
    }
}
</code></pre>

<p>And finally AndroidManifest for all activities:</p>

<p>

    
    </p>

<pre><code>    &lt;activity android:name=".activity.OfferActivity"
              android:configChanges="orientation"/&gt;
    &lt;activity android:name=".activity.CommentsActivity"
              android:configChanges="orientation"
              android:label="@string/comment_activity_title"/&gt;
    &lt;activity android:name=".activity.NewCommentActivity"
              android:windowSoftInputMode="adjustResize"
              android:configChanges="orientation"
              android:label="@string/new_comment_activity_title"/&gt;
&lt;/application&gt;
</code></pre>

<p></p>

<p>Please help me. 
Thanks.</p>
