Add buttons for removing statuses/locations in sharing tab #122
@ -330,7 +330,12 @@ public class BackgroundLocalizationService extends Service {
|
|||||||
String locationLevel = PrefUtils.getLocationLevel(getApplicationContext());
|
String locationLevel = PrefUtils.getLocationLevel(getApplicationContext());
|
||||||
String status = (PrefUtils.isStatusEnabled(getApplicationContext())) ? PrefUtils.getUserStatus(getApplicationContext()) : "";
|
String status = (PrefUtils.isStatusEnabled(getApplicationContext())) ? PrefUtils.getUserStatus(getApplicationContext()) : "";
|
||||||
|
|
||||||
|
|
||||||
if (locationLevel.equals(SharingLevel.PRESENCE.toString())) {
|
if (locationLevel.equals(SharingLevel.PRESENCE.toString())) {
|
||||||
|
if(!MapUtils.checkIfCoordinateIsValid(latitude,longitude)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
latitude = presenceLatitude;
|
latitude = presenceLatitude;
|
||||||
longitude = presenceLongitude;
|
longitude = presenceLongitude;
|
||||||
approximatedBuildingPart = presenceApproximatedName;
|
approximatedBuildingPart = presenceApproximatedName;
|
||||||
|
@ -77,6 +77,10 @@ public class MapUtils {
|
|||||||
return outsideLatitudeRange.contains(coordinate.getLatitude()) && outsideLongitudeRange.contains(coordinate.getLongitude());
|
return outsideLatitudeRange.contains(coordinate.getLatitude()) && outsideLongitudeRange.contains(coordinate.getLongitude());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Boolean checkIfCoordinateIsValid(Double latitude, Double longitude){
|
||||||
|
return Const.buildingLatitudeRange.contains(latitude) && Const.buildingLongitudeRange.contains(longitude);
|
||||||
|
}
|
||||||
|
|
||||||
// Function for marker animation
|
// Function for marker animation
|
||||||
public static class LatLngEvaluator implements TypeEvaluator<LatLng> {
|
public static class LatLngEvaluator implements TypeEvaluator<LatLng> {
|
||||||
// Method is used to interpolate the marker animation.
|
// Method is used to interpolate the marker animation.
|
||||||
|
Loading…
Reference in New Issue
Block a user