Update version

This commit is contained in:
Mieszko Wrzeszczyński 2019-01-07 10:20:33 +01:00
parent a98ec8de47
commit 76d008e098
2 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@ android {
applicationId "com.uam.wmi.findmytutor"
minSdkVersion 22
targetSdkVersion 27
versionCode 50
versionCode 52
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

View File

@ -186,18 +186,19 @@ public class BackgroundLocalizationService extends Service {
private void changeBackgroundMode() {
Integer prevInterval = notify_interval;
Boolean shouldExtendTimeInterval = Stream.of(coordinatesHistory)
.map(MapUtils::checkIfCoordinateIsValid).takeWhile(s -> !s).toList().size() == coordinatesHistory.size();
.map(MapUtils::checkIfCoordinateIsValid).takeWhile(s -> !s).toList().size() == coordinatesHistoryLength;
Boolean shouldAbbreviateTimeInterval = Stream.of(coordinatesHistory).
map(MapUtils::checkIfCoordinateIsValid).filter(x -> x).toList().size() > 0;
if (shouldExtendTimeInterval) {
notify_interval = notify_interval_outside_building;
}
if (shouldAbbreviateTimeInterval) {
notify_interval = notify_interval_inside_building;
}
if (coordinatesHistory.size() > coordinatesHistoryLength && shouldExtendTimeInterval) {
notify_interval = notify_interval_outside_building;
}
Integer changedMode = Long.valueOf(prevInterval).compareTo(Long.valueOf(notify_interval));
if (changedMode != 0) {