diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-04-05 14:55:40 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-04-05 18:23:20 +0200 |
| commit | cca4c9b0bcc1bd7742d419166fd5cfd5415fde9e (patch) | |
| tree | 5c88f703e8130e07ff98e0f13277a8fddc44d2b1 /main/src/cgeo/geocaching/DataStore.java | |
| parent | de71f9ba50bf7ee8f8987402b52912b014c5b460 (diff) | |
| download | cgeo-cca4c9b0bcc1bd7742d419166fd5cfd5415fde9e.zip cgeo-cca4c9b0bcc1bd7742d419166fd5cfd5415fde9e.tar.gz cgeo-cca4c9b0bcc1bd7742d419166fd5cfd5415fde9e.tar.bz2 | |
Do not use AndroidObservable
This lets us return to an unmodified version of RxJava.
Diffstat (limited to 'main/src/cgeo/geocaching/DataStore.java')
| -rw-r--r-- | main/src/cgeo/geocaching/DataStore.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java index f627d7d..ee6c9ef 100644 --- a/main/src/cgeo/geocaching/DataStore.java +++ b/main/src/cgeo/geocaching/DataStore.java @@ -20,16 +20,15 @@ import cgeo.geocaching.settings.Settings; import cgeo.geocaching.ui.dialog.Dialogs; import cgeo.geocaching.utils.FileUtils; import cgeo.geocaching.utils.Log; +import cgeo.geocaching.utils.RxUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.NonNull; -import rx.android.observables.AndroidObservable; import rx.functions.Action1; import rx.functions.Func0; import rx.functions.Func1; -import rx.schedulers.Schedulers; import rx.util.async.Async; import android.app.Activity; @@ -393,7 +392,7 @@ public class DataStore { */ public static void moveDatabase(final Activity fromActivity) { final ProgressDialog dialog = ProgressDialog.show(fromActivity, fromActivity.getString(R.string.init_dbmove_dbmove), fromActivity.getString(R.string.init_dbmove_running), true, false); - AndroidObservable.bindActivity(fromActivity, Async.fromFunc0(new Func0<Boolean>() { + RxUtils.subscribeOnIOThenUI(Async.fromCallable(new Func0<Boolean>() { @Override public Boolean call() { if (!LocalStorage.isExternalStorageAvailable()) { @@ -418,7 +417,7 @@ public class DataStore { init(); return true; } - })).subscribeOn(Schedulers.io()).subscribe(new Action1<Boolean>() { + }), new Action1<Boolean>() { @Override public void call(final Boolean success) { dialog.dismiss(); |
