|
|
@@ -54,6 +54,7 @@ import com.tencent.klevin.KleinManager;
|
|
|
import com.tencent.klevin.base.callback.KleinResponseCallback;
|
|
|
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
|
|
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
|
|
+import com.tencent.smtt.export.external.TbsCoreSettings;
|
|
|
import com.tencent.smtt.sdk.QbSdk;
|
|
|
import com.stmsdk.AbsTMSConfig;
|
|
|
import com.stmsdk.TMSDKContext;
|
|
|
@@ -61,16 +62,11 @@ import com.tencent.smtt.sdk.WebView;
|
|
|
import com.umeng.commonsdk.UMConfigure;
|
|
|
import com.umeng.socialize.PlatformConfig;
|
|
|
import com.youmi.android.offer.YmConfig;
|
|
|
-import io.reactivex.Observable;
|
|
|
-import io.reactivex.ObservableSource;
|
|
|
-import io.reactivex.Observer;
|
|
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
|
-import io.reactivex.functions.Function;
|
|
|
import io.reactivex.schedulers.Schedulers;
|
|
|
import org.xutils.x;
|
|
|
-
|
|
|
import java.lang.ref.WeakReference;
|
|
|
-
|
|
|
+import java.util.HashMap;
|
|
|
import cn.jpush.android.api.JPushInterface;
|
|
|
import io.reactivex.plugins.RxJavaPlugins;
|
|
|
import ren.yale.android.cachewebviewlib.WebViewCacheInterceptor;
|
|
|
@@ -439,7 +435,7 @@ public class SheepApp extends MultiDexApplication {
|
|
|
} else {
|
|
|
G.BAR_HEIGHT = (int) (25 * metric.density);//不准确的方法
|
|
|
}
|
|
|
- QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
|
|
|
+ /*QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
|
|
|
@Override
|
|
|
public void onCoreInitFinished() {
|
|
|
LogUtil.println("SheepApp", "QbSdk", "initX5Environment", "onCoreInitFinished");
|
|
|
@@ -450,7 +446,14 @@ public class SheepApp extends MultiDexApplication {
|
|
|
LogUtil.println("SheepApp", "QbSdk", "initX5Environment", "onViewInitFinished", b);
|
|
|
|
|
|
}
|
|
|
- });
|
|
|
+ });*/
|
|
|
+
|
|
|
+ // 在调用TBS初始化、创建WebView之前进行如下配置
|
|
|
+ HashMap map = new HashMap();
|
|
|
+ map.put(TbsCoreSettings.TBS_SETTINGS_USE_SPEEDY_CLASSLOADER, true);
|
|
|
+ map.put(TbsCoreSettings.TBS_SETTINGS_USE_DEXLOADER_SERVICE, true);
|
|
|
+ QbSdk.initTbsSettings(map);
|
|
|
+
|
|
|
x.Ext.init(this);
|
|
|
x.Ext.setDebug(org.xutils.BuildConfig.DEBUG); // 是否输出debug日志, 开启debug会影响性能.
|
|
|
|