title: onResume function not called after I remove the notification menu
body: <p>I am learning Android app development and I try a lot of things.</p>
  
  <p>Now I'm trying to tell the users if their GPS is turned on on or off. It works fine in all cases even when I move to another app and comes back to my activity. The problem is when I pull down the notification bar and change the setting of GPS from the notification bar on the phone, it seems that onResume() is not called when I come back to my activity. </p>
  
  <pre><code>protected void onResume(){
          super.onResume();
  
          LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
          boolean gpsEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
  
          if(gpsEnabled){
              int message = new Integer(R.string.enabled);
              TextView textView = new TextView(this);
              textView.setText(message);
              textView.setTextSize(20);
  
              Intent intent = getIntent();
              setContentView(textView);
          }
          else{
              int message = new Integer(R.string.disabled);
              TextView textView = new TextView(this);
              textView.setText(message);
              textView.setTextSize(20);
  
              Intent intent = getIntent();
              setContentView(textView);
          }
      }
  </code></pre>
  
  <p>This code is the same for onStart() and onCreate(). It works fine except when I pull down the phone's notification menu and change the GPS from there and come back to my activity which was at the background but still visible.</p>