aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/proguard-project.txt3
-rw-r--r--tests/src/cgeo/geocaching/utils/RxUtilsTest.java12
2 files changed, 11 insertions, 4 deletions
diff --git a/main/proguard-project.txt b/main/proguard-project.txt
index 114ebf8..a1682d9 100644
--- a/main/proguard-project.txt
+++ b/main/proguard-project.txt
@@ -70,9 +70,6 @@
-keep class org.apache.commons.lang3.StringUtils { *; }
-keep class org.apache.commons.io.IOUtils { *; }
-keep class org.apache.commons.io.FileUtils { *; }
--keepclassmembers class rx.Observable {
- public static Observable<Integer> range(int, int);
-}
# action providers are only referenced from XML
-keep public class cgeo.geocaching.sorting.SortActionProvider { *; }
diff --git a/tests/src/cgeo/geocaching/utils/RxUtilsTest.java b/tests/src/cgeo/geocaching/utils/RxUtilsTest.java
index 5259998..2487184 100644
--- a/tests/src/cgeo/geocaching/utils/RxUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/RxUtilsTest.java
@@ -6,13 +6,23 @@ import rx.Observable;
import rx.Subscription;
import rx.functions.Func1;
import rx.subjects.PublishSubject;
+import rx.subjects.ReplaySubject;
import android.test.AndroidTestCase;
public class RxUtilsTest extends AndroidTestCase {
+ // Observable.range(int, int) is not kept in the application by proguard. Use an explicit range here.
+ private static final ReplaySubject<Integer> range = ReplaySubject.createWithSize(10);
+ static {
+ for (int i = 1; i <= 10; i++) {
+ range.onNext(i);
+ }
+ range.onCompleted();
+ }
+
public static void testTakeUntil() {
- final Observable<Integer> observable = Observable.range(1, 10).lift(RxUtils.operatorTakeUntil(new Func1<Integer, Boolean>() {
+ final Observable<Integer> observable = range.lift(RxUtils.operatorTakeUntil(new Func1<Integer, Boolean>() {
@Override
public Boolean call(final Integer value) {
return value > 6;