I have overridden the finish call in a sub-activity like so
@Override
public void finish()
{
Log.e(this.toString(), "======== finish ========");
if(!this.exiting)
{
Log.e(this.toString(), "======== set RESULT_OK ========");
// Notify the caller Activity that the user successfully
// edited or inserted the data set
setResult(RESULT_OK);
}
else
{
Log.e(this.toString(), "======== set RESULT_CANCELED ========");
// Notify the caller Activity that the user has canceled the
// activity without altering anything
setResult(RESULT_CANCELED);
}
super.finish();
}
I am calling finishActivity on this sub-Activity from the Activity that started it for result. But I am not seeing the finish being hit. Instead it goes directly to onPause.
finish() is the method that you call on Activity when you want to finish it (for example because you want it to return a result to calling Activity).