title: LocationRequest.PRIORITY_HIGH_ACCURACY not working in API 21
body: <p>I'm trying to enable the location system settings and setting it to HIGH ACCURACY.
  The code works well on API above 21 as I press OK, the location setting is turned On and set to HIGH ACCURACY but for the API 21 and below that the location is turned ON but set to BATTERY SAVER.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      LocationRequest mLocationRequest;
  
      private static final int REQUEST_CHECK_SETTINGS = 0x1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Log.i("LogCheck", "createLocationRequest");
          mLocationRequest = new LocationRequest();
          mLocationRequest.setInterval(2000);
          mLocationRequest.setFastestInterval(2000);
          mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
  
          LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()
                  .addLocationRequest(mLocationRequest);
          SettingsClient client = LocationServices.getSettingsClient(this);
          Task&lt;LocationSettingsResponse&gt; task = client.checkLocationSettings(builder.build());
          task.addOnSuccessListener(this, new OnSuccessListener&lt;LocationSettingsResponse&gt;() {
              @Override
              public void onSuccess(LocationSettingsResponse locationSettingsResponse) {
                  mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
              }
          });
  
          task.addOnFailureListener(this, new OnFailureListener() {
              @Override
              public void onFailure(@NonNull Exception e) {
                  if (e instanceof ResolvableApiException) {
                      // Location settings are not satisfied, but this can be fixed
                      // by showing the user a dialog.
                      try {
                          // Show the dialog by calling startResolutionForResult(),
                          // and check the result in onActivityResult().
                          ResolvableApiException resolvable = (ResolvableApiException) e;
                          resolvable.startResolutionForResult(MainActivity.this,
                                  REQUEST_CHECK_SETTINGS);
                      } catch (IntentSender.SendIntentException sendEx) {
                          // Ignore the error.
                      }
                  }
              }
          });
  
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qxLpz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qxLpz.jpg" alt="API 25 request"></a>
    <strong>API 25 request</strong><br>
  <a href="https://i.stack.imgur.com/wkemE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wkemE.jpg" alt="API 25 setting"></a>
    <strong>API 25 setting</strong>
  <a href="https://i.stack.imgur.com/3rzxx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3rzxx.jpg" alt="API 21 request"></a>
    <strong>API 21 request</strong>
  <a href="https://i.stack.imgur.com/SosUK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SosUK.jpg" alt="API 21 setting"></a>
    <strong>API 21 setting</strong></p>
  
  <p>As you can see in code I have requested</p>
  
  <pre><code> mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
  </code></pre>
  
  <p>but It does not seem to work in API 21.</p>