50 |
import android.os.Message; |
import android.os.Message; |
51 |
import android.util.Log; |
import android.util.Log; |
52 |
import android.view.ContextMenu; |
import android.view.ContextMenu; |
53 |
|
import android.view.ContextMenu.ContextMenuInfo; |
54 |
import android.view.LayoutInflater; |
import android.view.LayoutInflater; |
55 |
import android.view.Menu; |
import android.view.Menu; |
56 |
import android.view.MenuItem; |
import android.view.MenuItem; |
57 |
import android.view.View; |
import android.view.View; |
|
import android.view.ContextMenu.ContextMenuInfo; |
|
58 |
import android.view.View.OnCreateContextMenuListener; |
import android.view.View.OnCreateContextMenuListener; |
59 |
import android.widget.AdapterView; |
import android.widget.AdapterView; |
60 |
import android.widget.EditText; |
import android.widget.EditText; |
61 |
import android.widget.ListView; |
import android.widget.ListView; |
62 |
import android.widget.Toast; |
import android.widget.Toast; |
63 |
import dk.thoerup.android.traininfo.common.StationBean; |
import dk.thoerup.android.traininfo.common.StationBean; |
64 |
import dk.thoerup.android.traininfo.common.StationBean.StationEntry; |
import dk.thoerup.android.traininfo.common.StationEntry; |
65 |
import dk.thoerup.traininfo.provider.ProviderFactory; |
import dk.thoerup.traininfo.provider.ProviderFactory; |
66 |
import dk.thoerup.traininfo.provider.StationProvider; |
import dk.thoerup.traininfo.provider.StationProvider; |
67 |
import dk.thoerup.traininfo.stationmap.GeoPair; |
import dk.thoerup.traininfo.stationmap.GeoPair; |
178 |
protected void onDestroy() { |
protected void onDestroy() { |
179 |
super.onDestroy(); |
super.onDestroy(); |
180 |
|
|
181 |
|
stationsFetched.removeMessages(0); |
182 |
|
|
183 |
|
|
184 |
if (locationLookup != null) { |
if (locationLookup != null) { |
185 |
locationLookup.stopSearch(); |
locationLookup.stopSearch(); |
451 |
MessageBox.showMessage(StationList.this, getString(stationlist_nolocationprovider), true ); |
MessageBox.showMessage(StationList.this, getString(stationlist_nolocationprovider), true ); |
452 |
//StationList.this.finish(); |
//StationList.this.finish(); |
453 |
return; |
return; |
454 |
|
case IDLE: |
455 |
|
Log.e("TrainInfo", "How did this happen ???"); |
456 |
|
dismissDialog(DLG_PROGRESS); // how did we get here ?? |
457 |
|
return; |
458 |
|
|
459 |
} |
} |
460 |
|
|
461 |
|
|
462 |
|
|
463 |
if (locationLookup.elapsedTime() >= GPS_TIMEOUT_MS) { |
if (locationLookup.elapsedTime() >= GPS_TIMEOUT_MS) { |
464 |
try { |
dismissDialog(DLG_PROGRESS); |
465 |
dismissDialog(DLG_PROGRESS); |
|
|
} catch (IllegalArgumentException ex) { |
|
|
// I get stacktraces that reports an exception is thrown here - |
|
|
// but i can not recreate the situation that causes said exception |
|
|
Log.e("TrainInfo", "Why the f*** is this exception thrown here ?? " + ex.getMessage() ); |
|
|
} |
|
466 |
|
|
467 |
locationLookup.stopSearch(); |
locationLookup.stopSearch(); |
468 |
|
|