Create new method for opening map activity and closing geo intent activity
This commit is contained in:
parent
e14013dc8e
commit
9ec1b8c239
1 changed files with 6 additions and 5 deletions
|
@ -137,14 +137,12 @@ public class GeoIntentActivity extends OsmandListActivity {
|
|||
}
|
||||
settings.setMapLocationToShow(p.getLatitude(), p.getLongitude(),
|
||||
settings.getLastKnownMapZoom(), pd); //$NON-NLS-1$
|
||||
MapActivity.launchMapActivityMoveToTop(GeoIntentActivity.this);
|
||||
GeoIntentActivity.this.finish();
|
||||
startMapActivityAndCloseCurrent();
|
||||
} else {
|
||||
Uri uri = intent.getData();
|
||||
String searchString = p != null && p.isGeoAddress() ? p.getQuery() : uri.toString();
|
||||
settings.setSearchRequestToShow(searchString);
|
||||
MapActivity.launchMapActivityMoveToTop(GeoIntentActivity.this);
|
||||
GeoIntentActivity.this.finish();
|
||||
startMapActivityAndCloseCurrent();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -153,7 +151,10 @@ public class GeoIntentActivity extends OsmandListActivity {
|
|||
|
||||
}
|
||||
|
||||
|
||||
private void startMapActivityAndCloseCurrent() {
|
||||
MapActivity.launchMapActivityMoveToTop(GeoIntentActivity.this);
|
||||
GeoIntentActivity.this.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
|
|
Loading…
Reference in a new issue