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