Remove unnecessary code

This commit is contained in:
Dima-1 2019-12-09 13:41:59 +02:00
parent 3fef243a85
commit fe9755b11f

View file

@ -2371,12 +2371,6 @@ public class OsmandSettings {
edit.commit(); edit.commit();
objectToShow = toShow; objectToShow = toShow;
if (addToHistory) { if (addToHistory) {
if (pointDescription.isFavorite()) {
// int localeNameID = PersonalFavouritePoint.PersonalPoint.getLocalName(pointDescription.getName());
// if (localeNameID != 0) {
// pointDescription.setName(ctx.getString(localeNameID));
// }
}
SearchHistoryHelper.getInstance(ctx).addNewItemToHistory(latitude, longitude, pointDescription); SearchHistoryHelper.getInstance(ctx).addNewItemToHistory(latitude, longitude, pointDescription);
} }
} }
@ -2583,16 +2577,6 @@ public class OsmandSettings {
settingsAPI.getString(globalPreferences, WORK_POINT_DESCRIPTION, ""), getWorkPoint()); settingsAPI.getString(globalPreferences, WORK_POINT_DESCRIPTION, ""), getWorkPoint());
} }
public void setHomePoint(double latitude, double longitude, PointDescription p) {
settingsAPI.edit(globalPreferences).putFloat(HOME_POINT_LAT, (float) latitude).putFloat(HOME_POINT_LON, (float) longitude).commit();
settingsAPI.edit(globalPreferences).putString(HOME_POINT_DESCRIPTION, PointDescription.serializeToString(p)).commit();
}
public void setWorkPoint(double latitude, double longitude, PointDescription p) {
settingsAPI.edit(globalPreferences).putFloat(WORK_POINT_LAT, (float) latitude).putFloat(WORK_POINT_LON, (float) longitude).commit();
settingsAPI.edit(globalPreferences).putString(WORK_POINT_DESCRIPTION, PointDescription.serializeToString(p)).commit();
}
public LatLon getMyLocationToStart() { public LatLon getMyLocationToStart() {
float lat = settingsAPI.getFloat(globalPreferences, MY_LOC_POINT_LAT, 0); float lat = settingsAPI.getFloat(globalPreferences, MY_LOC_POINT_LAT, 0);
float lon = settingsAPI.getFloat(globalPreferences, MY_LOC_POINT_LON, 0); float lon = settingsAPI.getFloat(globalPreferences, MY_LOC_POINT_LON, 0);