diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-05-12 17:53:01 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-05-13 07:33:03 +0200 |
| commit | 37774fbe5fbe6a0900207309747c6b01fcfa2753 (patch) | |
| tree | f447603ddf9dbbd9ff8c4200094172264fd8eb5f /main/src/cgeo/geocaching/Geocache.java | |
| parent | 29d6e9e4bb286f4bbe4ba5166ad8886d241e5f4f (diff) | |
| download | cgeo-37774fbe5fbe6a0900207309747c6b01fcfa2753.zip cgeo-37774fbe5fbe6a0900207309747c6b01fcfa2753.tar.gz cgeo-37774fbe5fbe6a0900207309747c6b01fcfa2753.tar.bz2 | |
Upgrade to RxJava 0.18.3 and use the new Scheduler interface
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 19c15fd..8836115 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -35,7 +35,6 @@ import cgeo.geocaching.utils.MatcherWrapper; import cgeo.geocaching.utils.UncertainProperty; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; - import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; import org.apache.commons.collections4.Predicate; @@ -44,11 +43,9 @@ import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; - import rx.Scheduler; -import rx.Scheduler.Inner; import rx.Subscription; -import rx.functions.Action1; +import rx.functions.Action0; import android.app.Activity; import android.content.Intent; @@ -1438,9 +1435,9 @@ public class Geocache implements ICache, IWaypoint { } public Subscription drop(final Handler handler, final Scheduler scheduler) { - return scheduler.schedule(new Action1<Inner>() { + return scheduler.createWorker().schedule(new Action0() { @Override - public void call(final Inner inner) { + public void call() { try { dropSynchronous(); handler.sendMessage(Message.obtain()); @@ -1499,9 +1496,9 @@ public class Geocache implements ICache, IWaypoint { } public Subscription refresh(final int newListId, final CancellableHandler handler, final Scheduler scheduler) { - return scheduler.schedule(new Action1<Inner>() { + return scheduler.createWorker().schedule(new Action0() { @Override - public void call(final Inner inner) { + public void call() { refreshSynchronous(newListId, handler); handler.sendEmptyMessage(CancellableHandler.DONE); } |
