Skip to content

Commit a100bd0

Browse files
committed
Revert the rxjava2 to rxjava3 upgrade of 02f57d4
This changed the timing when dialogs are shown, ready and when they could be updated. Need to be further investigated before we update it to not crash half the app.
1 parent 99e50f1 commit a100bd0

File tree

5 files changed

+20
-23
lines changed

5 files changed

+20
-23
lines changed

buildsystem/dependencies.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ ext {
5656

5757
// app frameworks and utilities
5858

59-
rxJavaVersion = '3.1.11'
60-
rxAndroidVersion = '3.0.2'
61-
rxBindingVersion = '3.1.0'
59+
rxJavaVersion = '2.2.21'
60+
rxAndroidVersion = '2.1.1'
61+
rxBindingVersion = '2.2.0'
6262

6363
daggerVersion = '2.57'
6464

@@ -188,9 +188,9 @@ ext {
188188
okHttpDigest : "io.github.rburgst:okhttp-digest:${okHttpDigestVersion}",
189189
pcloud : "com.github.cryptomator.pcloud-sdk-java:java-core:${pcloudVersion}",
190190
recyclerViewFastScroll : "com.simplecityapps:recyclerview-fastscroll:${recyclerViewFastScrollVersion}",
191-
rxJava : "io.reactivex.rxjava3:rxjava:${rxJavaVersion}",
192-
rxAndroid : "io.reactivex.rxjava3:rxandroid:${rxAndroidVersion}",
193-
rxBinding : "com.jakewharton.rxbinding3:rxbinding:${rxBindingVersion}",
191+
rxJava : "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
192+
rxAndroid : "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
193+
rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxBindingVersion}",
194194
stax : "stax:stax:${staxVersion}",
195195
testingSupportLib : "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
196196
timber : "com.jakewharton.timber:timber:${timberVersion}",

domain/src/main/java/org/cryptomator/domain/executor/PostExecutionThread.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.cryptomator.domain.executor;
22

3-
import io.reactivex.rxjava3.core.Scheduler;
3+
import io.reactivex.Scheduler;
44

55
/**
66
* Thread abstraction created to change the execution context from any thread to any other thread.

generator/src/main/resources/templates/UseCaseTemplate.vm

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
1717

1818
private $implClassName impl;
1919
private org.cryptomator.domain.executor.BackgroundTasks.Registration registration;
20-
private io.reactivex.rxjava3.disposables.Disposable disposable = io.reactivex.rxjava3.disposables.Disposable.empty();
20+
private io.reactivex.disposables.Disposable disposable = io.reactivex.internal.disposables.EmptyDisposable.INSTANCE;
2121

2222
@javax.inject.Inject
2323
public ${simpleName}(
@@ -36,10 +36,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
3636
@Override
3737
public void unsubscribe() {
3838
if (disposable != null && !disposable.isDisposed()) {
39-
if (registration != null) {
40-
registration.unregister();
41-
registration = null;
42-
}
39+
registration.unregister();
4340
disposable.dispose();
4441
disposable = null;
4542
#if ( $hasCancelHandler )
@@ -104,7 +101,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
104101
#end
105102
);
106103
#if ( $hasProgressAware )
107-
final io.reactivex.rxjava3.subscribers.DisposableSubscriber<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>> subscriber = new io.reactivex.rxjava3.subscribers.DisposableSubscriber<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>>(){
104+
final io.reactivex.subscribers.DisposableSubscriber<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>> subscriber = new io.reactivex.subscribers.DisposableSubscriber<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>>(){
108105
@Override
109106
public void onComplete() {
110107
resultHandler.onFinished();
@@ -123,7 +120,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
123120
}
124121
};
125122
${simpleName}.this.disposable = subscriber;
126-
io.reactivex.rxjava3.core.Flowable.fromPublisher(new org.reactivestreams.Publisher<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>>(){
123+
io.reactivex.Flowable.fromPublisher(new org.reactivestreams.Publisher<org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>>(){
127124
public void subscribe(final org.reactivestreams.Subscriber<? super org.cryptomator.domain.usecases.ResultWithProgress<$resultClassName,$progressStateName>> subscriber) {
128125
org.cryptomator.domain.usecases.ProgressAware<$progressStateName> progressAware = new org.cryptomator.domain.usecases.ThrottlingProgressAware<$progressStateName>(new org.cryptomator.domain.usecases.ProgressAware<$progressStateName>() {
129126
@Override
@@ -155,7 +152,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
155152
}
156153
}
157154
#else
158-
final io.reactivex.rxjava3.subscribers.DisposableSubscriber<$subscriberResultClassName> subscriber = new io.reactivex.rxjava3.subscribers.DisposableSubscriber<$subscriberResultClassName>(){
155+
final io.reactivex.subscribers.DisposableSubscriber<$subscriberResultClassName> subscriber = new io.reactivex.subscribers.DisposableSubscriber<$subscriberResultClassName>(){
159156
@Override
160157
public void onComplete() {
161158
resultHandler.onFinished();
@@ -177,7 +174,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
177174
}
178175
};
179176
${simpleName}.this.disposable = subscriber;
180-
io.reactivex.rxjava3.core.Flowable.fromCallable(new java.util.concurrent.Callable<$subscriberResultClassName>(){
177+
io.reactivex.Flowable.fromCallable(new java.util.concurrent.Callable<$subscriberResultClassName>(){
181178
public $subscriberResultClassName call() throws Exception {
182179
final int id = EXECUTION_ID.getAndIncrement();
183180
boolean failed = true;
@@ -203,7 +200,7 @@ public class $simpleName implements org.cryptomator.generator.Unsubscribable {
203200
}
204201
#end
205202
})
206-
.subscribeOn(io.reactivex.rxjava3.schedulers.Schedulers.from(threadExecutor))
203+
.subscribeOn(io.reactivex.schedulers.Schedulers.from(threadExecutor))
207204
.onBackpressureLatest()
208205
.observeOn(postExecutionThread.getScheduler())
209206
.subscribe(subscriber);
@@ -232,7 +229,7 @@ public void run(final org.cryptomator.domain.usecases.ResultHandler<$resultClass
232229
#if( $foreach.hasNext ),#end
233230
#end
234231
);
235-
final io.reactivex.rxjava3.subscribers.DisposableSubscriber<$subscriberResultClassName> subscriber = new io.reactivex.rxjava3.subscribers.DisposableSubscriber<$subscriberResultClassName>(){
232+
final io.reactivex.subscribers.DisposableSubscriber<$subscriberResultClassName> subscriber = new io.reactivex.subscribers.DisposableSubscriber<$subscriberResultClassName>(){
236233
@Override
237234
public void onComplete() {
238235
resultHandler.onFinished();
@@ -254,7 +251,7 @@ public void run(final org.cryptomator.domain.usecases.ResultHandler<$resultClass
254251
}
255252
};
256253
this.disposable = subscriber;
257-
io.reactivex.rxjava3.core.Flowable.fromCallable(new java.util.concurrent.Callable<$subscriberResultClassName>(){
254+
io.reactivex.Flowable.fromCallable(new java.util.concurrent.Callable<$subscriberResultClassName>(){
258255
public $subscriberResultClassName call() throws Exception {
259256
final int id = EXECUTION_ID.getAndIncrement();
260257
boolean failed = true;
@@ -283,7 +280,7 @@ public void run(final org.cryptomator.domain.usecases.ResultHandler<$resultClass
283280
#end
284281
}
285282
})
286-
.subscribeOn(io.reactivex.rxjava3.schedulers.Schedulers.from(threadExecutor))
283+
.subscribeOn(io.reactivex.schedulers.Schedulers.from(threadExecutor))
287284
.observeOn(postExecutionThread.getScheduler())
288285
.subscribe(subscriber);
289286
}

presentation/src/main/java/org/cryptomator/presentation/UIThread.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package org.cryptomator.presentation
33
import org.cryptomator.domain.executor.PostExecutionThread
44
import javax.inject.Inject
55
import javax.inject.Singleton
6-
import io.reactivex.rxjava3.core.Scheduler
7-
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
6+
import io.reactivex.Scheduler
7+
import io.reactivex.android.schedulers.AndroidSchedulers
88

99
/**
1010
* MainThread (UI Thread) implementation based on a [io.reactivex.Scheduler]

presentation/src/main/java/org/cryptomator/presentation/util/PasswordStrengthUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import android.widget.ProgressBar;
77
import android.widget.TextView;
88

9-
import com.jakewharton.rxbinding3.widget.RxTextView;
9+
import com.jakewharton.rxbinding2.widget.RxTextView;
1010

1111
import java.util.List;
1212

0 commit comments

Comments
 (0)