This commit is contained in:
Victor Shcherb 2013-05-31 17:42:55 +02:00
parent eb2d75d4ad
commit 3c2de4612e

View file

@ -300,13 +300,13 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
searchArea.setText(filter.getSearchArea()); searchArea.setText(filter.getSearchArea());
updateSearchPoiTextButton(); updateSearchPoiTextButton();
if (searchNearBy) { if (searchNearBy) {
app.getLocationProvider().addCompassListener(this);
app.getLocationProvider().addLocationListener(this); app.getLocationProvider().addLocationListener(this);
location = app.getLocationProvider().getLastKnownLocation(); location = app.getLocationProvider().getLastKnownLocation();
app.getLocationProvider().resumeAllUpdates(); app.getLocationProvider().resumeAllUpdates();
} }
updateLocation(location); updateLocation(location);
} }
app.getLocationProvider().addCompassListener(this);
app.getLocationProvider().registerOrUnregisterCompassListener(true); app.getLocationProvider().registerOrUnregisterCompassListener(true);
} }