@Test public void removeLocationUpdatesForPendingIntent() { PendingIntent pendingIntent = mock(PendingIntent.class); engine.removeLocationUpdates(pendingIntent); verify(locationManagerMock, times(1)).removeUpdates(any(PendingIntent.class)); }
@SuppressLint("MissingPermission") @Override public void removeLocationUpdates(@NonNull LocationListener listener) { if (listener != null) { locationManager.removeUpdates(listener); } }
AndroidLocationEngineImpl implements LocationEngineImpl<LocationListener> { @SuppressLint("MissingPermission") @Override public void removeLocationUpdates(@NonNull LocationListener listener) { if (listener != null) { locationManager.removeUpdates(listener); } } }
AndroidLocationEngineImpl implements LocationEngineImpl<LocationListener> { @SuppressLint("MissingPermission") @Override public void removeLocationUpdates(@NonNull LocationListener listener) { if (listener != null) { locationManager.removeUpdates(listener); } } AndroidLocationEngineImpl(@NonNull Context context); }
AndroidLocationEngineImpl implements LocationEngineImpl<LocationListener> { @SuppressLint("MissingPermission") @Override public void removeLocationUpdates(@NonNull LocationListener listener) { if (listener != null) { locationManager.removeUpdates(listener); } } AndroidLocationEngineImpl(@NonNull Context context); @NonNull @Override LocationListener createListener(LocationEngineCallback<LocationEngineResult> callback); @Override void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull LocationListener listener,
                                     @Nullable Looper looper); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull PendingIntent pendingIntent); @SuppressLint("MissingPermission") @Override void removeLocationUpdates(@NonNull LocationListener listener); @Override void removeLocationUpdates(PendingIntent pendingIntent); }
AndroidLocationEngineImpl implements LocationEngineImpl<LocationListener> { @SuppressLint("MissingPermission") @Override public void removeLocationUpdates(@NonNull LocationListener listener) { if (listener != null) { locationManager.removeUpdates(listener); } } AndroidLocationEngineImpl(@NonNull Context context); @NonNull @Override LocationListener createListener(LocationEngineCallback<LocationEngineResult> callback); @Override void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull LocationListener listener,
                                     @Nullable Looper looper); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull PendingIntent pendingIntent); @SuppressLint("MissingPermission") @Override void removeLocationUpdates(@NonNull LocationListener listener); @Override void removeLocationUpdates(PendingIntent pendingIntent);  }