title: How to cancel dialog created on LocationSettingsRequest
body: <p>I am using LocationSettingsRequest to ask user to enable location following is my code</p>
  
  <pre><code> LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder().addLocationRequest(mLocationRequest);
      PendingResult&lt;LocationSettingsResult&gt; result = LocationServices.SettingsApi.checkLocationSettings(mGoogleApiClient, builder.build());
      result.setResultCallback(new ResultCallback&lt;LocationSettingsResult&gt;() {
          @Override
          public void onResult(@NonNull LocationSettingsResult locationSettingsResult) {
              final Status status = locationSettingsResult.getStatus();
              final LocationSettingsStates locationSettingsStates = locationSettingsResult.getLocationSettingsStates();
              switch (status.getStatusCode()) {
                  case LocationSettingsStatusCodes.SUCCESS:// All location settings are satisfied. The client can initialize location requests here.
                      //mGoogleApiClient.connect();
                      startLocationUpdates();
                      break;
                  case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:// Location settings are not satisfied, but this can be fixed by showing the user a dialog.
                      try {
                          status.startResolutionForResult(getActivity(), REQUEST_CHECK_SETTINGS);// Show the dialog by calling startResolutionForResult(), and check the result in onActivityResult().
                      } catch (IntentSender.SendIntentException e) {
                          e.printStackTrace();// Ignore the error.
                      }
                      break;
                  case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:// Location settings are not satisfied. However, we have no way to fix the settings so we won't show the dialog.
                      break;
              }
          }
      });
  </code></pre>
  
  <p><strong>It creates a dialog I want to cancel dialog is fragment is stopped how to do it there is no method for it</strong></p>