@Test public void getLocationAvailability_gps_network_shouldBeAvailable() { shadowLocationManager.setProviderEnabled(GPS_PROVIDER, true); shadowLocationManager.setProviderEnabled(NETWORK_PROVIDER, true); Location location = new Location("test"); shadowLocationManager.setLastKnownLocation(GPS_PROVIDER, location); LocationAvailability availability = delegate.getLocationAvailability(); assertThat(availability.isLocationAvailable()).isTrue(); }
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public LocationAvailability getLocationAvailability() { return locationEngine.createLocationAvailability(); }
FusedLocationProviderServiceDelegate implements LocationEngine.Callback { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public LocationAvailability getLocationAvailability() { return locationEngine.createLocationAvailability(); } }
FusedLocationProviderServiceDelegate implements LocationEngine.Callback { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public LocationAvailability getLocationAvailability() { return locationEngine.createLocationAvailability(); } FusedLocationProviderServiceDelegate(Context context); }
FusedLocationProviderServiceDelegate implements LocationEngine.Callback { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public LocationAvailability getLocationAvailability() { return locationEngine.createLocationAvailability(); } FusedLocationProviderServiceDelegate(Context context); void add(IFusedLocationProviderCallback callback); void remove(IFusedLocationProviderCallback callback); Location getLastLocation(); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) LocationAvailability getLocationAvailability(); void requestLocationUpdates(LocationRequest request); void removeLocationUpdates(List<LocationRequest> requests); void setMockMode(boolean isMockMode); void setMockLocation(Location mockLocation); void setMockTrace(String path, String filename); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportLocation(Location location); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportProviderDisabled(String provider); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportProviderEnabled(String provider); }
FusedLocationProviderServiceDelegate implements LocationEngine.Callback { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public LocationAvailability getLocationAvailability() { return locationEngine.createLocationAvailability(); } FusedLocationProviderServiceDelegate(Context context); void add(IFusedLocationProviderCallback callback); void remove(IFusedLocationProviderCallback callback); Location getLastLocation(); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) LocationAvailability getLocationAvailability(); void requestLocationUpdates(LocationRequest request); void removeLocationUpdates(List<LocationRequest> requests); void setMockMode(boolean isMockMode); void setMockLocation(Location mockLocation); void setMockTrace(String path, String filename); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportLocation(Location location); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportProviderDisabled(String provider); @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) void reportProviderEnabled(String provider);  }