File tree 1 file changed +5
-0
lines changed
app/src/main/java/fr/free/nrw/commons
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 44
44
import fr .free .nrw .commons .upload .FileUtils ;
45
45
import fr .free .nrw .commons .utils .ConfigUtils ;
46
46
import io .reactivex .android .schedulers .AndroidSchedulers ;
47
+ import io .reactivex .internal .functions .Functions ;
48
+ import io .reactivex .plugins .RxJavaPlugins ;
47
49
import io .reactivex .schedulers .Schedulers ;
48
50
import timber .log .Timber ;
49
51
@@ -128,6 +130,9 @@ public void onCreate() {
128
130
129
131
createNotificationChannel (this );
130
132
133
+ // This handler will catch exceptions thrown from Observables after they are disposed,
134
+ // or from Observables that are (deliberately or not) missing an onError handler.
135
+ RxJavaPlugins .setErrorHandler (Functions .emptyConsumer ());
131
136
132
137
if (setupLeakCanary () == RefWatcher .DISABLED ) {
133
138
return ;
You can’t perform that action at this time.
0 commit comments