Hello,
I start the activity (descendant of PreferenceActivity) from my worker activity as follows:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1458)
loadInfo();
}
void showSettingsDialog()
{
startActivityForResult(new Intent().setClass(this, MyConfigure.class), 1458);
}
MyConfigure class does NOT have any setResult() calls. In fact, MyConfigure class doesn't have any code except OnCreate where it loads preferences using addPreferencesFromResource.
Now onActivityResult is called with requestCode of 1458 prematurely, right after MyConfigure activity is run. Tested on 1.6 and 2.1 emulators as well as 2.1 device. Is there a call to setResult() buried somewhere in PreferenceActivity? Or how else can this premature call be explained?