diff options
Diffstat (limited to 'main/src/cgeo/geocaching/NavigateAnyPointActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/NavigateAnyPointActivity.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java index 741414b..ddafb51 100644 --- a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java +++ b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java @@ -214,7 +214,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { private List<Destination> getHistoryOfSearchedLocations() { if (historyOfSearchedLocations == null) { // Load from database - historyOfSearchedLocations = cgData.loadHistoryOfSearchedLocations(); + historyOfSearchedLocations = DataStore.loadHistoryOfSearchedLocations(); } return historyOfSearchedLocations; @@ -331,7 +331,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { menu.findItem(R.id.menu_caches_around).setVisible(visible); menu.findItem(R.id.menu_clear_history).setEnabled(!getHistoryOfSearchedLocations().isEmpty()); - } catch (Exception e) { + } catch (RuntimeException e) { // nothing } @@ -377,7 +377,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { getHistoryOfSearchedLocations().add(0, loc); // Save location - cgData.saveSearchedDestination(loc); + DataStore.saveSearchedDestination(loc); // Ensure to remove the footer historyListView.removeFooterView(getEmptyHistoryFooter()); @@ -396,7 +396,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { getHistoryOfSearchedLocations().remove(destination); // Save - cgData.removeSearchedDestination(destination); + DataStore.removeSearchedDestination(destination); if (getHistoryOfSearchedLocations().isEmpty()) { if (historyListView.getFooterViewsCount() == 0) { @@ -415,7 +415,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { getHistoryOfSearchedLocations().clear(); // Save - cgData.clearSearchedDestinations(); + DataStore.clearSearchedDestinations(); if (historyListView.getFooterViewsCount() == 0) { historyListView.addFooterView(getEmptyHistoryFooter()); @@ -443,7 +443,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { return; } - cgeocaches.startActivityCoordinates(this, coords); + CacheListActivity.startActivityCoordinates(this, coords); finish(); } @@ -454,7 +454,7 @@ public class NavigateAnyPointActivity extends AbstractActivity { try { latButton.setHint(geo.getCoords().format(GeopointFormatter.Format.LAT_DECMINUTE_RAW)); lonButton.setHint(geo.getCoords().format(GeopointFormatter.Format.LON_DECMINUTE_RAW)); - } catch (final Exception e) { + } catch (final RuntimeException e) { Log.w("Failed to update location."); } } |
