Add buttons for removing statuses/locations in sharing tab #122

Merged
s416204 merged 75 commits from addRemovingManuals into develop 2019-01-05 00:45:41 +01:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit ac3e8310d1 - Show all commits

View File

@ -330,7 +330,12 @@ public class BackgroundLocalizationService extends Service {
String locationLevel = PrefUtils.getLocationLevel(getApplicationContext());
String status = (PrefUtils.isStatusEnabled(getApplicationContext())) ? PrefUtils.getUserStatus(getApplicationContext()) : "";
if (locationLevel.equals(SharingLevel.PRESENCE.toString())) {
if(!MapUtils.checkIfCoordinateIsValid(latitude,longitude)){
return null;
}
latitude = presenceLatitude;
longitude = presenceLongitude;
approximatedBuildingPart = presenceApproximatedName;

View File

@ -77,6 +77,10 @@ public class MapUtils {
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
public static class LatLngEvaluator implements TypeEvaluator<LatLng> {
// Method is used to interpolate the marker animation.