Here's the scenario:
- Activity "A" creates and executes AsyncTask "T"
- As "T" is running in the background, the user moves away from "A"
- Examples of how the user could move away from "A":
- Pressing "go" and starting an Intent launching Activity "B" (most common in my app)
- Pressing the "back" button (also fairly common in my app)
- Rotating the screen, without android:configChanges="orientation|keyboardHidden"
- etc.
- Examples of how the user could move away from "A":
- "T" has done its work and returns, trying to call function "F" on "A" to update "A"'s UI, but "A" is... "gone"?!
How can I make sure the above does not "bomb"?