Fix Issue 621. Inconsistency of Search
This commit is contained in:
parent
8e03bb33fe
commit
8d65ec6397
1 changed files with 15 additions and 19 deletions
|
@ -33,18 +33,13 @@ public class SearchActivity extends TabActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
Intent intent = getIntent();
|
||||
int tabIndex = 0;
|
||||
if(intent != null){
|
||||
if (intent != null) {
|
||||
tabIndex = intent.getIntExtra(TAB_INDEX_EXTRA, POI_TAB_INDEX);
|
||||
float lat = intent.getFloatExtra(SEARCH_LAT, 0);
|
||||
float lon = intent.getFloatExtra(SEARCH_LON, 0);
|
||||
if(lat != 0 || lon != 0){
|
||||
if (lat != 0 || lon != 0) {
|
||||
searchPoint = new LatLon(lat, lon);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +60,7 @@ public class SearchActivity extends TabActivity {
|
|||
host.setCurrentTab(tabIndex);
|
||||
}
|
||||
|
||||
|
||||
private Intent createIntent(Class<? extends Activity> cl){
|
||||
Intent intent = new Intent(this, cl);
|
||||
if(searchPoint != null){
|
||||
|
|
Loading…
Reference in a new issue