diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 3c4367d58..e59a3bf8c 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -169,7 +169,7 @@ public class WebViewActivity extends AbsActivity { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); mWebView.getSettings().setUseWideViewPort(true); // 关键点 mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件 diff --git a/common/src/main/java/com/yunbao/common/utils/FileUtil.java b/common/src/main/java/com/yunbao/common/utils/FileUtil.java index 481333a3a..5450d44ef 100644 --- a/common/src/main/java/com/yunbao/common/utils/FileUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/FileUtil.java @@ -7,6 +7,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; +import java.io.IOException; import java.io.PrintWriter; /** @@ -88,7 +89,11 @@ public class FileUtil { duration= Long.parseLong(time); } catch (Exception ex) { } finally { - mmr.release(); + try { + mmr.release(); + } catch (IOException e) { + throw new RuntimeException(e); + } } return duration; } diff --git a/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java b/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java index 20eb8fa88..99ea4e543 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java +++ b/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java @@ -250,7 +250,8 @@ public class NobleNoticeView extends FrameLayout { @Override public void onStep(int frame, double v) { System.out.println("frame = " + frame); - if (frame == 20) { + System.out.println("scrollLayout.getMeasuredWidth() = " + scrollLayout.getMeasuredWidth()); + if (frame == 21) { setButtonPosition(roleType); observable.observeOn(AndroidSchedulers.mainThread()) .subscribe(bitmap -> { diff --git a/config.gradle b/config.gradle index d0e2bbf1b..605cfe1b3 100644 --- a/config.gradle +++ b/config.gradle @@ -1,17 +1,17 @@ ext { android = [ - compileSdkVersion: 31, + compileSdkVersion: 33, buildToolsVersion: "29.0.2", minSdkVersion : 21, - targetSdkVersion : 31, - versionCode : 444, + targetSdkVersion : 33, + versionCode : 445, versionName : "6.5.4" ] manifestPlaceholders = [ //正式、 serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : "https://ceshi.yaoulive.com", +// serverHost : " https://ceshi.yaoulive.com", @@ -21,10 +21,10 @@ ext { baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false - isGooglePlay : false, + isGooglePlay : true, //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, + isPluginModel : false, ] } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java index 188b029f8..cb9a3ca94 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java @@ -160,9 +160,9 @@ public class LiveGameDialogFragment extends AbsDialogFragment { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); - mWebView.getSettings().setAppCacheEnabled(true); +// mWebView.getSettings().setAppCacheEnabled(true); mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口 mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index 4570cb243..b696900cd 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -157,9 +157,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); - mWebView.getSettings().setAppCacheEnabled(true); +// mWebView.getSettings().setAppCacheEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java index 778db921d..37787ffe6 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserAnchorMailBoxWebInfoPopDialog.java @@ -69,9 +69,9 @@ public class LiveUserAnchorMailBoxWebInfoPopDialog extends AbsDialogPopupWindow mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = getContext().getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); - mWebView.getSettings().setAppCacheEnabled(true); +// mWebView.getSettings().setAppCacheEnabled(true); mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); diff --git a/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java index ac473703e..972fe0736 100644 --- a/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java @@ -168,7 +168,7 @@ public class CustomerServiceWebViewActivity extends AbsActivity { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); mWebView.getSettings().setUseWideViewPort(true); // 关键点 mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件 diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java index cca48ca2f..f0cd94024 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java @@ -203,7 +203,7 @@ public class MyWebViewActivity extends AbsActivity { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); mWebView.getSettings().setUseWideViewPort(true); // 关键点 mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件 diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java index efdf07e1d..098f8dbab 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java @@ -178,7 +178,7 @@ public class MyWebViewActivity2 extends AbsActivity { mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); mWebView.getSettings().setUseWideViewPort(true); // 关键点 mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件 diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index 14ab0f658..90e508f5c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -106,7 +106,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setDomStorageEnabled(true); String appCachePath = mContext.getCacheDir().getAbsolutePath(); - mWebView.getSettings().setAppCachePath(appCachePath); +// mWebView.getSettings().setAppCachePath(appCachePath); mWebView.getSettings().setAllowFileAccess(true); mWebView.getSettings().setUseWideViewPort(true); // 关键点 mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件 diff --git a/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java index 833ee5299..0467d6552 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java @@ -35,6 +35,7 @@ import com.yunbao.video.views.VideoMusicViewHolder; import com.yunbao.video.views.VideoProcessViewHolder; import java.io.File; +import java.io.IOException; import java.lang.ref.SoftReference; import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -659,7 +660,11 @@ public class VideoEditActivity extends AbsActivity implements mHandler.release(); } if (mMetadataRetriever != null) { - mMetadataRetriever.release(); + try { + mMetadataRetriever.release(); + } catch (IOException e) { + throw new RuntimeException(e); + } } if (mFilterViewHolder != null) { mFilterViewHolder.release(); diff --git a/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java index 4e927d95e..446bc2d61 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java @@ -334,7 +334,11 @@ public class VideoPublishActivity extends AbsActivity implements ITXLivePlayList e.printStackTrace(); } finally { if (mmr != null) { - mmr.release(); + try { + mmr.release(); + } catch (IOException e) { + throw new RuntimeException(e); + } } } if (bitmap == null) {