aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/MainActivity.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-03-26 23:26:53 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-03-26 23:29:01 +0100
commit492bff3e024d5475f7cd1da921800e5d531d87e9 (patch)
treeb23d024a08c3659b9439bb6b0f2e6c6931a8bf68 /main/src/cgeo/geocaching/MainActivity.java
parent4b693e9beb39d2043b76e6eeb09e91e4059ef7aa (diff)
downloadcgeo-492bff3e024d5475f7cd1da921800e5d531d87e9.zip
cgeo-492bff3e024d5475f7cd1da921800e5d531d87e9.tar.gz
cgeo-492bff3e024d5475f7cd1da921800e5d531d87e9.tar.bz2
Allow subscription to either location or direction data
The forced union of both information is not appropriate in several activities where only GPS data is needed, or where direction data update less components than location data (such as cache lists). This is part of work on #3680.
Diffstat (limited to 'main/src/cgeo/geocaching/MainActivity.java')
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index ab6256f..3295d04 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -144,7 +144,7 @@ public class MainActivity extends AbstractActivity {
private int satellitesVisible = 0;
@Override
- public void updateGeoDir(final IGeoData data, final float dir) {
+ public void updateGeoData(final IGeoData data) {
if (data.getGpsEnabled() == gpsEnabled &&
data.getSatellitesFixed() == satellitesFixed &&
data.getSatellitesVisible() == satellitesVisible) {
@@ -215,7 +215,7 @@ public class MainActivity extends AbstractActivity {
@Override
public void onResume() {
- super.onResume(Subscriptions.from(locationUpdater.start(), satellitesHandler.start()));
+ super.onResume(Subscriptions.from(locationUpdater.start(GeoDirHandler.UPDATE_GEODATA), satellitesHandler.start(GeoDirHandler.UPDATE_GEODATA)));
updateUserInfoHandler.sendEmptyMessage(-1);
startBackgroundLogin();
init();
@@ -508,7 +508,7 @@ public class MainActivity extends AbstractActivity {
private class UpdateLocation extends GeoDirHandler {
@Override
- public void updateGeoDir(final IGeoData geo, final float dir) {
+ public void updateGeoData(final IGeoData geo) {
if (!nearestView.isClickable()) {
nearestView.setFocusable(true);
nearestView.setClickable(true);