Rename variable

This commit is contained in:
Alexander Sytnyk 2018-01-22 15:12:32 +02:00
parent dff5f4b906
commit b3eec3aace
2 changed files with 6 additions and 6 deletions

View file

@ -85,7 +85,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
private LatLon myLocation;
private Float heading;
private boolean inLocationUpdate = false;
private boolean useCachedLocation;
private boolean cachedMyLocation;
private boolean appModeChanged;
private boolean appModeListenerAdded;
private boolean autoHide;
@ -1216,8 +1216,8 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
return myLocation;
}
public boolean isUseCachedLocation() {
return useCachedLocation;
public boolean isCachedMyLocation() {
return cachedMyLocation;
}
public Float getHeading() {
@ -1228,9 +1228,9 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
if (active && displayDistanceDirection()) {
if (location == null) {
location = getMapActivity().getMyApplication().getLocationProvider().getLastStaleKnownLocation();
useCachedLocation = location != null;
cachedMyLocation = location != null;
} else {
useCachedLocation = false;
cachedMyLocation = false;
}
if (location != null) {
myLocation = new LatLon(location.getLatitude(), location.getLongitude());

View file

@ -1238,7 +1238,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
TextView distanceText = (TextView) view.findViewById(R.id.distance);
ImageView direction = (ImageView) view.findViewById(R.id.direction);
float myHeading = menu.getHeading() == null ? 0f : menu.getHeading();
int color = menu.isUseCachedLocation() ? R.color.icon_color : 0;
int color = menu.isCachedMyLocation() ? R.color.icon_color : 0;
DashLocationFragment.updateLocationView(false, menu.getMyLocation(), myHeading, direction, color, distanceText,
color, menu.getLatLon().getLatitude(), menu.getLatLon().getLongitude(), screenOrientation, app, activity);
}