if incoming URL was properly parsed, remove GeoIntentActivity from backstack

When a user clicks on a URL that OsmAnd claims, they will first go to the
GeoIntentActivity, which will show them the processing, and any errors,
then it'll take them to the map.  Since the map will stay in the same task
as the original Activity where the user clicked it, the user is very likely
to be clicking on the back button.  Calling finish() here gives them one
less thing to click back on, since GeoIntentActivity will be removed.

closes #1037 https://github.com/osmandapp/Osmand/pull/1037
This commit is contained in:
Hans-Christoph Steiner 2015-01-14 20:49:36 +01:00
parent 2537d92a6a
commit 8d927de6ac

View file

@ -126,6 +126,7 @@ public class GeoIntentActivity extends OsmandListActivity {
.getItemId(0)); .getItemId(0));
} }
} }
finish();
} else { } else {
AccessibleToast.makeText(GeoIntentActivity.this, AccessibleToast.makeText(GeoIntentActivity.this,
getString(R.string.search_offline_geo_error, intent.getData()), Toast.LENGTH_LONG).show(); getString(R.string.search_offline_geo_error, intent.getData()), Toast.LENGTH_LONG).show();