remove some obsolete code

This commit is contained in:
sonora 2015-01-16 09:05:26 +01:00
parent 29f83a6f81
commit 0c69f6aceb
7 changed files with 16 additions and 46 deletions

View file

@ -1507,7 +1507,7 @@ public class OsmandSettings {
public static final String LAST_SEARCHED_REGION = "last_searched_region"; //$NON-NLS-1$
public static final String LAST_SEARCHED_CITY = "last_searched_city"; //$NON-NLS-1$
public static final String LAST_SEARCHED_CITY_NAME = "last_searched_city_name"; //$NON-NLS-1$
public static final String lAST_SEARCHED_POSTCODE= "last_searched_postcode"; //$NON-NLS-1$
public static final String LAST_SEARCHED_POSTCODE= "last_searched_postcode"; //$NON-NLS-1$
public static final String LAST_SEARCHED_STREET = "last_searched_street"; //$NON-NLS-1$
public static final String LAST_SEARCHED_BUILDING = "last_searched_building"; //$NON-NLS-1$
public static final String LAST_SEARCHED_INTERSECTED_STREET = "last_searched_intersected_street"; //$NON-NLS-1$
@ -1541,7 +1541,7 @@ public class OsmandSettings {
public boolean setLastSearchedRegion(String region, LatLon l) {
SettingsEditor edit = settingsAPI.edit(globalPreferences).putString(LAST_SEARCHED_REGION, region).putLong(LAST_SEARCHED_CITY, -1).
putString(LAST_SEARCHED_CITY_NAME, "").putString(lAST_SEARCHED_POSTCODE, "").
putString(LAST_SEARCHED_CITY_NAME, "").putString(LAST_SEARCHED_POSTCODE, "").
putString(LAST_SEARCHED_STREET,"").putString(LAST_SEARCHED_BUILDING, ""); //$NON-NLS-1$ //$NON-NLS-2$
if (settingsAPI.contains(globalPreferences,LAST_SEARCHED_INTERSECTED_STREET)) {
edit.putString(LAST_SEARCHED_INTERSECTED_STREET, ""); //$NON-NLS-1$
@ -1552,12 +1552,12 @@ public class OsmandSettings {
}
public String getLastSearchedPostcode(){
return settingsAPI.getString(globalPreferences, lAST_SEARCHED_POSTCODE, null);
return settingsAPI.getString(globalPreferences, LAST_SEARCHED_POSTCODE, null);
}
public boolean setLastSearchedPostcode(String postcode, LatLon point){
SettingsEditor edit = settingsAPI.edit(globalPreferences).putLong(LAST_SEARCHED_CITY, -1).putString(LAST_SEARCHED_STREET, "").putString( //$NON-NLS-1$
LAST_SEARCHED_BUILDING, "").putString(lAST_SEARCHED_POSTCODE, postcode); //$NON-NLS-1$
SettingsEditor edit = settingsAPI.edit(globalPreferences).putLong(LAST_SEARCHED_CITY, -1).putString(LAST_SEARCHED_STREET, "") //$NON-NLS-1$
.putString(LAST_SEARCHED_BUILDING, "").putString(LAST_SEARCHED_POSTCODE, postcode); //$NON-NLS-1$
if(settingsAPI.contains(globalPreferences,LAST_SEARCHED_INTERSECTED_STREET)){
edit.putString(LAST_SEARCHED_INTERSECTED_STREET, ""); //$NON-NLS-1$
}
@ -1576,8 +1576,8 @@ public class OsmandSettings {
public boolean setLastSearchedCity(Long cityId, String name, LatLon point) {
SettingsEditor edit = settingsAPI.edit(globalPreferences).putLong(LAST_SEARCHED_CITY, cityId).putString(LAST_SEARCHED_CITY_NAME, name).
putString(LAST_SEARCHED_STREET, "").putString(LAST_SEARCHED_BUILDING, ""); //$NON-NLS-1$
edit.remove(lAST_SEARCHED_POSTCODE);
putString(LAST_SEARCHED_STREET, "").putString(LAST_SEARCHED_BUILDING, "").putString(LAST_SEARCHED_POSTCODE, ""); //$NON-NLS-1$
//edit.remove(LAST_SEARCHED_POSTCODE);
if(settingsAPI.contains(globalPreferences,LAST_SEARCHED_INTERSECTED_STREET)){
edit.putString(LAST_SEARCHED_INTERSECTED_STREET, ""); //$NON-NLS-1$
}

View file

@ -211,7 +211,7 @@ public class SearchAddressFragment extends SherlockFragment {
building = null;
searchPoint = null;
osmandSettings.setLastSearchedBuilding("", null);
osmandSettings.setLastSearchedPoint(null);
//also empties Point, REMOVES intersecting street
updateUI();
}
});
@ -223,9 +223,7 @@ public class SearchAddressFragment extends SherlockFragment {
building = null;
searchPoint = null;
osmandSettings.setLastSearchedStreet("", null);
osmandSettings.setLastSearchedIntersectedStreet("", null);
osmandSettings.setLastSearchedBuilding("", null);
osmandSettings.setLastSearchedPoint(null);
//also empties Building, (Intersecting Street), Point
updateUI();
}
});
@ -238,12 +236,8 @@ public class SearchAddressFragment extends SherlockFragment {
street2 = null;
building = null;
searchPoint = null;
osmandSettings.setLastSearchedPostcode("", null);
osmandSettings.setLastSearchedCity(0L, "", null);
osmandSettings.setLastSearchedStreet("", null);
osmandSettings.setLastSearchedIntersectedStreet("", null);
osmandSettings.setLastSearchedBuilding("", null);
osmandSettings.setLastSearchedPoint(null);
osmandSettings.setLastSearchedCity(-1L, "", null);
//also empties Street, (Intersecting Street), Building, Point, REMOVES Postcode
updateUI();
}
});
@ -258,12 +252,7 @@ public class SearchAddressFragment extends SherlockFragment {
building = null;
searchPoint = null;
osmandSettings.setLastSearchedRegion("", null);
osmandSettings.setLastSearchedPostcode("", null);
osmandSettings.setLastSearchedCity(0L, "", null);
osmandSettings.setLastSearchedStreet("", null);
osmandSettings.setLastSearchedIntersectedStreet("", null);
osmandSettings.setLastSearchedBuilding("", null);
osmandSettings.setLastSearchedPoint(null);
// also empties City, Postcode, Street, (Interseting street), Building, Point
updateUI();
}
});

View file

@ -38,9 +38,7 @@ public class SearchBuildingByNameActivity extends SearchByNameAbstractActivity<B
@Override
protected void reset() {
//osmandSettings.setLastSearchedIntersectedStreet("", null);
//osmandSettings.setLastSearchedBuilding("", null);
//osmandSettings.setLastSearchedPoint(null);
super.reset();
}

View file

@ -34,13 +34,8 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<City>
@Override
protected void reset() {
searchVillagesMode = -1;
//osmandSettings.setLastSearchedPostcode("", null);
//osmandSettings.setLastSearchedCity(0L, "", null);
//osmandSettings.setLastSearchedStreet("", null);
//osmandSettings.setLastSearchedIntersectedStreet("", null);
//osmandSettings.setLastSearchedBuilding("", null);
//osmandSettings.setLastSearchedPoint(null);
//searchVillagesMode = -1;
//osmandSettings.setLastSearchedCity(-1L, "", null);
super.reset();
}
@ -58,7 +53,7 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<City>
public void onClick(View v) {
searchVillagesMode = 1;
research();
//searchVillages.setVisibility(View.GONE);
searchVillages.setVisibility(View.GONE);
}
});
getListView().addFooterView(ll);

View file

@ -33,12 +33,6 @@ public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<Reg
@Override
protected void reset() {
//osmandSettings.setLastSearchedRegion("", null);
//osmandSettings.setLastSearchedPostcode("", null);
//osmandSettings.setLastSearchedCity(0L, "", null);
//osmandSettings.setLastSearchedStreet("", null);
//osmandSettings.setLastSearchedIntersectedStreet("", null);
//osmandSettings.setLastSearchedBuilding("", null);
//osmandSettings.setLastSearchedPoint(null);
super.reset();
}

View file

@ -27,10 +27,7 @@ public class SearchStreet2ByNameActivity extends SearchByNameAbstractActivity<St
@Override
protected void reset() {
//osmandSettings.setLastSearchedStreet("", null);
//osmandSettings.setLastSearchedIntersectedStreet("", null);
//osmandSettings.setLastSearchedBuilding("", null);
//osmandSettings.setLastSearchedPoint(null);
super.reset();
}

View file

@ -53,11 +53,8 @@ public class SearchStreetByNameActivity extends SearchByNameAbstractActivity<Str
@Override
protected void reset() {
searchWithCity = -1;
//searchWithCity = -1;
//osmandSettings.setLastSearchedStreet("", null);
//osmandSettings.setLastSearchedIntersectedStreet("", null);
//osmandSettings.setLastSearchedBuilding("", null);
//osmandSettings.setLastSearchedPoint(null);
super.reset();
}