On presence mode only on WMI
This commit is contained in:
parent
6030ec6d84
commit
ac3e8310d1
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user