Skip to content

Commit

Permalink
去除注射库,因为最低android O
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepblue1996 committed Sep 27, 2019
1 parent f5db029 commit f67e0b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions dovelib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dependencies {
api 'com.squareup.okhttp3:okhttp:4.2.0'
api 'com.squareup.okhttp3:logging-interceptor:4.2.0'

implementation 'com.uber.autodispose:autodispose:0.8.0'
implementation 'com.uber.autodispose:autodispose-android-archcomponents:0.8.0'
//implementation 'com.uber.autodispose:autodispose:0.8.0'
//implementation 'com.uber.autodispose:autodispose-android-archcomponents:0.8.0'

implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.zchu:rxcache:2.3.5'
Expand Down
5 changes: 1 addition & 4 deletions dovelib/src/main/java/com/prohua/dove/Dove.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.prohua.dove;

import android.app.Activity;
import androidx.lifecycle.LifecycleOwner;
import android.content.Context;
import androidx.annotation.NonNull;

Expand All @@ -14,8 +13,6 @@
import com.prohua.dove.interceptor.DoveNetworkInterceptor;
import com.prohua.dove.interceptor.DoveNotNetworkInterceptor;
import com.prohua.dove.utils.HttpResponseFunc;
import com.uber.autodispose.AutoDispose;
import com.uber.autodispose.android.lifecycle.AndroidLifecycleScopeProvider;
import com.zchu.rxcache.RxCache;
import com.zchu.rxcache.data.CacheResult;
import com.zchu.rxcache.diskconverter.GsonDiskConverter;
Expand Down Expand Up @@ -346,7 +343,7 @@ public static <T> void flyLife(Activity activity, Observable<T> observable, Dove
.observeOn(AndroidSchedulers.mainThread())
// HttpResponseFunc()为拦截onError事件的拦截器
.onErrorResumeNext(new HttpResponseFunc<T>())
.as(AutoDispose.<T>autoDisposable(AndroidLifecycleScopeProvider.from((LifecycleOwner) activity)))
//.as(AutoDispose.<T>autoDisposable(AndroidLifecycleScopeProvider.from((LifecycleOwner) activity)))
.subscribe(observer);
}

Expand Down

0 comments on commit f67e0b9

Please sign in to comment.