title: Refreshing activity / "performing stop of activity that is not resumed" error
body: <p>I'm trying to refresh my activity once the GPS is enabled via an alertdialog that opens the GPS settings.
  I implemented the onResume function but in result I get this on my logcat : </p>
  
  <pre><code>performing stop of activity that is not resumed(...)
  </code></pre>
  
  <p>I have looked on this <a href="https://stackoverflow.com/questions/9289114/refreshing-activity-when-dialog-dismisses">post</a> but I can't figure out what is wrong with my code (or my onResume function) and how to refresh my activity after coming back from GPS settings.</p>
  
  <p>can you help me please ?
  here is my <a href="https://gist.github.com/RidouaneHicham/24667b270ca5d4decae2" rel="nofollow noreferrer">MainActivity.java</a></p>