title: Android App crashes after calling finish
body: <p>This was something that I expect not to be happening as per my understanding.</p>
  
  <p>In my app, I execute() an AsyncTask which might take less than 2-3 seconds. In that AsyncTask I have runOnUiThread() which updates few UI controls value.</p>
  
  <p>This works fine until, if I do a click on Sign out button which does a finish() of Activity.</p>
  
  <p>I get Null pointer exception that findViewById returned null. I can add null check before updating but considering the amount of UI screens and AsyncTasks used I would end up in huge number of checks.</p>
  
  <p>Why would the UI thread still be in execution after finish() is called?</p>
  
  <p>What is best solution to this case?
  Issue happens only when there is exact coincidence with time difference between AsyncTask completion and call to finish().</p>
  
  <p>Regards,</p>
  
  <p>Harsha</p>