diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-03-10 15:13:29 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-03-10 15:13:29 +0100 |
| commit | e6c28990874bccf5dadd6bd67a41e4d7463d4b3b (patch) | |
| tree | a6eae85946ebd27d6091c94ec688c757208bc644 /main/src/cgeo/geocaching/sensors | |
| parent | 4ed6d0cc7c6b8be97c69fd4061f431442715b3b1 (diff) | |
| download | cgeo-e6c28990874bccf5dadd6bd67a41e4d7463d4b3b.zip cgeo-e6c28990874bccf5dadd6bd67a41e4d7463d4b3b.tar.gz cgeo-e6c28990874bccf5dadd6bd67a41e4d7463d4b3b.tar.bz2 | |
Automatically pair subscriptions in onResume/onPause
Diffstat (limited to 'main/src/cgeo/geocaching/sensors')
| -rw-r--r-- | main/src/cgeo/geocaching/sensors/GeoDirHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/sensors/GeoDirHandler.java b/main/src/cgeo/geocaching/sensors/GeoDirHandler.java index 523fb1f..917b9ff 100644 --- a/main/src/cgeo/geocaching/sensors/GeoDirHandler.java +++ b/main/src/cgeo/geocaching/sensors/GeoDirHandler.java @@ -42,13 +42,14 @@ public abstract class GeoDirHandler { * Register the current GeoDirHandler for GeoData and direction information (if the * preferences allow it). */ - public void start() { + public Subscription start() { subscription = app.geoDirObservable().subscribe(new Action1<ImmutablePair<IGeoData, Float>>() { @Override public void call(final ImmutablePair<IGeoData, Float> geoDir) { handleGeoDir(geoDir); } }, AndroidSchedulers.mainThread()); + return subscription; } /** |
