I am pretty sure there is an error in the file Earthquake.java
When the user sets a preference and thus the requestCode== SHOW_PREFERENCES , the result of the context menu will not send the desired Activity.RESULT_OK value.
Here is my fix. Any feedback is appreciated.
//BEGINNING OF PROPOSED FIX
Code:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
//REMOVED super.onActivityResult(requestCode, resultCode, data);
if (requestCode == SHOW_PREFERENCES)
//REMOVED if (resultCode == Activity.RESULT_OK)
{
updateFromPreferences();
refreshEarthquakes();
}
//ADDED:
else{
super.onActivityResult(requestCode, resultCode, data);
}
//END OF ADDED CODE
}
//END OF THIS POST