fix build
This commit is contained in:
parent
2d5b853eb3
commit
1769542fea
1 changed files with 10 additions and 9 deletions
|
@ -69,13 +69,8 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
||||||
if(!getMyApplication().getSettings().isLastKnownMapLocation()) {
|
if(!getMyApplication().getSettings().isLastKnownMapLocation()) {
|
||||||
// show first time when application ran
|
// show first time when application ran
|
||||||
location = getMyApplication().getLocationProvider().getFirstTimeRunDefaultLocation();
|
location = getMyApplication().getLocationProvider().getFirstTimeRunDefaultLocation();
|
||||||
loc = new LatLon(getMyApplication().getLocationProvider().getFirstTimeRunDefaultLocation().getLatitude(), getMyApplication().getLocationProvider().getFirstTimeRunDefaultLocation().getLongitude());
|
|
||||||
} else {
|
} else {
|
||||||
location = getLocationProvider().getLastKnownLocation();
|
location = getLocationProvider().getLastKnownLocation();
|
||||||
loc = new LatLon(getLocationProvider().getLastKnownLocation().getLatitude(), getLocationProvider().getLastKnownLocation().getLongitude());
|
|
||||||
}
|
|
||||||
if (loc == null) {
|
|
||||||
loc = getMyApplication().getSettings().getLastKnownMapLocation();
|
|
||||||
}
|
}
|
||||||
updateLocation(location);
|
updateLocation(location);
|
||||||
}
|
}
|
||||||
|
@ -180,11 +175,17 @@ public class DashFavoritesFragment extends DashBaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateLocation(Location location) {
|
public void updateLocation(Location location) {
|
||||||
if (location == null){
|
//if (location == null) {
|
||||||
return;
|
// return;
|
||||||
|
//}
|
||||||
|
if (location != null) {
|
||||||
|
this.location = location;
|
||||||
|
loc = new LatLon(location.getLatitude(), location.getLongitude());
|
||||||
}
|
}
|
||||||
this.location = location;
|
if (loc == null) {
|
||||||
this.loc = new LatLon(location.getLatitude(), location.getLongitude());
|
loc = getMyApplication().getSettings().getLastKnownMapLocation();
|
||||||
|
}
|
||||||
|
this.loc = loc;
|
||||||
updateArrows();
|
updateArrows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue