try without intent condition in SearchHistory, too

This commit is contained in:
sonora 2014-12-31 00:39:14 +01:00
parent c225db8b8d
commit 0074272997

View file

@ -75,14 +75,14 @@ public class SearchHistoryFragment extends SherlockListFragment implements Sear
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
FragmentActivity activity = getActivity(); FragmentActivity activity = getActivity();
Intent intent = activity.getIntent(); //Intent intent = activity.getIntent();
if (intent != null) { //if (intent != null) {
double lat = intent.getDoubleExtra(SEARCH_LAT, 0); // double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
double lon = intent.getDoubleExtra(SEARCH_LON, 0); // double lon = intent.getDoubleExtra(SEARCH_LON, 0);
if (lat != 0 || lon != 0) { // if (lat != 0 || lon != 0) {
historyAdapter.location = new LatLon(lat, lon); // historyAdapter.location = new LatLon(lat, lon);
} // }
} //}
if (location == null && activity instanceof SearchActivity) { if (location == null && activity instanceof SearchActivity) {
location = ((SearchActivity) activity).getSearchPoint(); location = ((SearchActivity) activity).getSearchPoint();
} }