--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2011/01/30 21:08:32 1219 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2011/03/30 17:26:50 1245 @@ -178,6 +178,8 @@ protected void onDestroy() { super.onDestroy(); + stationsFetched.removeMessages(0); + if (locationLookup != null) { locationLookup.stopSearch(); @@ -449,18 +451,18 @@ MessageBox.showMessage(StationList.this, getString(stationlist_nolocationprovider), true ); //StationList.this.finish(); return; + case IDLE: + Log.e("TrainInfo", "How did this happen ???"); + dismissDialog(DLG_PROGRESS); // how did we get here ?? + return; + } if (locationLookup.elapsedTime() >= GPS_TIMEOUT_MS) { - try { - 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() ); - } + dismissDialog(DLG_PROGRESS); + locationLookup.stopSearch();