|
|
@@ -72,6 +72,7 @@ import java.lang.ref.WeakReference;
|
|
|
import cn.jpush.android.api.JPushInterface;
|
|
|
import ren.yale.android.cachewebviewlib.WebViewCacheInterceptor;
|
|
|
import ren.yale.android.cachewebviewlib.WebViewCacheInterceptorInst;
|
|
|
+import ren.yale.android.cachewebviewlib.config.CacheExtensionConfig;
|
|
|
import tv.danmaku.ijk.media.exo2.Exo2PlayerManager;
|
|
|
|
|
|
/**
|
|
|
@@ -284,7 +285,20 @@ public class SheepApp extends MultiDexApplication {
|
|
|
|
|
|
// RemitStoreOnSQLite.setRemitToDBDelayMillis(3000);
|
|
|
//webView 缓存优化初始化 https://github.com/yale8848/CacheWebView
|
|
|
- WebViewCacheInterceptorInst.getInstance().init(new WebViewCacheInterceptor.Builder(this).setDebug(BuildConfig.DEBUG).setCacheSize(Long.MAX_VALUE));
|
|
|
+ //删除以下缓存后缀
|
|
|
+ CacheExtensionConfig extension = new CacheExtensionConfig();
|
|
|
+ extension.removeExtension("html");
|
|
|
+ extension.removeExtension("htm");
|
|
|
+ extension.removeExtension("js");
|
|
|
+ extension.removeExtension("ico");
|
|
|
+ extension.removeExtension("css");
|
|
|
+ extension.removeExtension("xml");
|
|
|
+ extension.removeExtension("swf");
|
|
|
+ extension.removeExtension("txt");
|
|
|
+ extension.removeExtension("text");
|
|
|
+ extension.removeExtension("conf");
|
|
|
+ extension.removeExtension("webp");
|
|
|
+ WebViewCacheInterceptorInst.getInstance().init(new WebViewCacheInterceptor.Builder(this).setCacheExtensionConfig(extension).setDebug(BuildConfig.DEBUG).setCacheSize(Long.MAX_VALUE));
|
|
|
//GSYVideoPlayer https://github.com/CarGuo/GSYVideoPlayer
|
|
|
PlayerFactory.setPlayManager(Exo2PlayerManager.class);//EXO模式
|
|
|
// PlayerFactory.setPlayManager(SystemPlayerManager.class);//系统模式
|