title: Android LocationListener, AbstractMethodError on onStatusChanged and onProviderDisabled
body: <p>I have a simple activity with a button, that uses the LocationManager to try to get the current location:</p>
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Button buttonGps = findViewById(R.id.buttonGps);
  
      final Context activity = this;
  
      buttonGps.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              if (!checkForPhonePermission()) {
                  return;
              }
  
              LocationManager locationManager = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE);
  
              locationManager.requestSingleUpdate(LocationManager.GPS_PROVIDER, new LocationListener() {
                  @Override
                  public void onLocationChanged(@NonNull Location location) {
                      Log.d(TAG, location.getLatitude() + &quot;&quot;);
                  }
              }, Looper.myLooper());
          }
      });
  }
  </code></pre>
  <p>I created an emulator in Android Studio with the API level 22, and after giving the permission, and with the gps of emulator on, the app crashes with this error when clicking the button:</p>
  <pre><code>java.lang.AbstractMethodError: abstract method &quot;void android.location.LocationListener.onStatusChanged(java.lang.String, int, android.os.Bundle)&quot;
  </code></pre>
  <p>If I press the button with the gps turned off, I get this error instead:</p>
  <pre><code>java.lang.AbstractMethodError: abstract method &quot;void android.location.LocationListener.onProviderDisabled(java.lang.String)&quot;
  </code></pre>
  <p>If I try the app on my Xiaomi Mi A1, it only crashes when the gps is off and the button is clicked, it does not crash when the gps is on and the button is pressed.</p>
  <p><a href="https://developer.android.com/reference/android/location/LocationListener" rel="noreferrer">From the documentation</a>, those methods are marked with default, so I should not need to implement them.</p>
  <p>Is there any reason for this behavior?</p>