Commit 72e6eea2 by 刘鹏

Merge remote-tracking branch 'origin/d/v4.3.97' into feat/lp/lp_4.3.97

parents a82fca8b fe7fc7d7
......@@ -50,7 +50,6 @@ import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.ScreenUtil
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -485,7 +484,7 @@ class AudioHomeActivity :
//权限申请
requestPermission()
ActionCountUtils.record("call_phone_page", "call_phone_page_visit", "0", "1")
ActionCountUtils.record("call_phone_page", "call_phone_page_visit", listenerUid ?: "0", "1")
}
......
......@@ -4,9 +4,7 @@ import android.annotation.SuppressLint
import android.content.Context
import android.os.Handler
import android.text.TextUtils
import android.util.Log
import com.alibaba.android.arouter.launcher.ARouter
import com.bytedance.apm.insight.ApmInsightAgent
import com.google.gson.Gson
import com.ydl.audioim.bean.AgoraInvitationBean
import com.ydl.audioim.http.AudioApiRequestUtil
......@@ -25,6 +23,7 @@ import com.ydl.ydl_av.messge_service.callback.LoginCallback
import com.ydl.ydl_av.messge_service.request.LoginParam
import com.ydl.ydl_av.messge_service.response.CallLocalResponse
import com.ydl.ydl_av.messge_service.response.CallRemoteResponse
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.LogUtil
......@@ -43,7 +42,6 @@ import io.agora.rtm.RtmStatusCode.ConnectionChangeReason.CONNECTION_CHANGE_REASO
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import org.json.JSONObject
import java.util.*
import java.util.concurrent.TimeUnit
......@@ -451,6 +449,7 @@ class YDLavManager {
}
override fun onFailure(msg: String?) {
Apm.reportCustom("agora_login_error", msg ?: "", Exception(msg))
LogUtil.e("[agora]实时消息登录失败:$msg")
writeAgoraLog(
"声网rtm登录失败:$msg-------Time:${
......@@ -667,6 +666,8 @@ class YDLavManager {
* https://docs.agora.io/cn/Voice/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_i_rtc_engine_event_handler.html#a31b2974a574ec45e62bb768e17d1f49e
* */
override fun onConnectionStateChanged(state: Int, reason: Int) {
val msg = "state:${state},reason:${reason}"
Apm.reportCustom("agora_connectionstate_error", msg, Exception(msg))
sdkStatus = state
writeAgoraLog(
"声网rtm登录状态:${state}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}",
......
......@@ -99,7 +99,7 @@ class ExpertIntroActivity : AppCompatActivity() {
binding.viewPager.adapter = adapter
binding.viewPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
override fun onPageSelected(position: Int) {
adapter.onSelect(position)
adapter.onSelect(position, lastSelectPos)
if (position == data.size - 1 && lastSelectPos < position) {
loadMore()
}
......
......@@ -166,7 +166,7 @@ internal class IntroAdapter(
ijkVideoView?.pause()
}
fun onSelect(position: Int) {
fun onSelect(position: Int, lastPos:Int) {
curPos = position
onLoadDialStatus(position)
if (!ConfideNetworkUtil.isWifi(context) && !hasAgreePlayWithoutWiFi) {
......@@ -177,6 +177,15 @@ internal class IntroAdapter(
// entry.value.seekTo(0)
entry.value.start()
} else {
if (entry.key == lastPos) {
ActionCountUtils.record(
"listen_counselor_content_play_page",
"listen_counselor_content_playtime_click",
data[lastPos].confideId ?: "",
if (data[lastPos].isVideo) "1" else "2",
(entry.value.currentPosition / 1000F).toString()
)
}
entry.value.seekTo(0)
entry.value.pause()
}
......
......@@ -8,8 +8,6 @@ import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.provider.MediaStore;
import androidx.viewpager.widget.PagerAdapter;
import androidx.core.view.ViewCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
......@@ -17,6 +15,9 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.core.view.ViewCompat;
import androidx.viewpager.widget.PagerAdapter;
import com.bumptech.glide.Glide;
import com.luck.picture.lib.photoview.PhotoView;
import com.netease.nimlib.sdk.AbortableFuture;
......@@ -31,6 +32,7 @@ import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum;
import com.netease.nimlib.sdk.msg.constant.MsgDirectionEnum;
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.app.Apm;
import com.yidianling.im.R;
import com.yidianling.nimbase.common.ToastHelper;
import com.yidianling.nimbase.common.activity.ToolBarOptions;
......@@ -335,6 +337,22 @@ public class WatchMessagePictureActivity extends UI {
onDownloadStart(msg);
message = msg; // 下载成功之后,判断是否是同一条消息时需要使用
downloadFuture = NIMClient.getService(MsgService.class).downloadAttachment(msg, false);
downloadFuture.setCallback(new RequestCallback<Void>() {
@Override
public void onSuccess(Void o) {
}
@Override
public void onFailed(int i) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", new Exception(String.valueOf(i)));
}
@Override
public void onException(Throwable throwable) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", throwable);
}
});
}
private boolean isOriginImageHasDownloaded(final IMMessage message) {
......
......@@ -10,7 +10,6 @@ import android.media.MediaPlayer.OnPreparedListener;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import androidx.appcompat.app.ActionBar;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.SurfaceHolder;
......@@ -23,21 +22,25 @@ import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import com.netease.nimlib.sdk.AbortableFuture;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.Observer;
import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.msg.MsgService;
import com.netease.nimlib.sdk.msg.MsgServiceObserve;
import com.netease.nimlib.sdk.msg.attachment.VideoAttachment;
import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum;
import com.netease.nimlib.sdk.msg.model.AttachmentProgress;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.app.Apm;
import com.yidianling.im.R;
import com.yidianling.nimbase.common.ToastHelper;
import com.yidianling.nimbase.common.activity.ToolBarOptions;
import com.yidianling.nimbase.common.activity.UI;
import com.yidianling.nimbase.common.util.file.FileUtil;
import com.yidianling.nimbase.common.util.sys.TimeUtil;
import com.yidianling.im.R;
import com.yidianling.uikit.custom.config.YDLToolBarOptions;
/**
......@@ -499,6 +502,21 @@ public class WatchVideoActivity extends UI implements Callback {
// async download original image
onDownloadStart(message);
downloadFuture = NIMClient.getService(MsgService.class).downloadAttachment(message, false);
downloadFuture.setCallback(new RequestCallback<Void>() {
@Override
public void onSuccess(Void o) {
}
@Override
public void onFailed(int i) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", new Exception(String.valueOf(i)));
}
@Override
public void onException(Throwable throwable) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", throwable);
}
});
downloading = true;
}
}
......
......@@ -4,13 +4,9 @@ import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
......@@ -30,7 +26,6 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.SPUtils;
import com.google.gson.Gson;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.Observer;
......@@ -49,28 +44,20 @@ import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.base.config.HttpConfig;
import com.ydl.ydlcommon.data.PlatformDataManager;
import com.ydl.ydlcommon.app.Apm;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.ui.LoadingDialogFragment;
import com.ydl.ydlcommon.utils.AnimUtils;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetworkParamsUtils;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunLogConfig;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils;
import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.ydl.ydlcommon.view.dialog.ListDialog;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.bean.RemoveHistory;
import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.event.CloseBottomWebviewEvent;
import com.yidianling.im.event.MultipleAnswerBean;
import com.yidianling.im.event.MultipleSelectedEvent;
......@@ -97,7 +84,6 @@ import com.yidianling.uikit.api.NimUIKitImpl;
import com.yidianling.uikit.business.ait.AitManager;
import com.yidianling.uikit.business.session.activity.YDLBaseMessageActivity;
import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper;
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper;
import com.yidianling.uikit.business.session.module.input.InputPanel;
import com.yidianling.uikit.business.session.module.list.MessageListPanelEx;
import com.yidianling.uikit.business.session.view.ChatPrivateTips;
......@@ -1336,6 +1322,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
public void onFailed(int code) {
if (msg != null) {
sendFailWithBlackList(code, msg);
Apm.INSTANCE.reportCustom("yx_sendmessage_error", "sessionId:" + msg.getSessionId(), new Exception(String.valueOf(code)));
}
}
......
......@@ -7,14 +7,15 @@ import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
import android.provider.MediaStore;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
import android.view.View;
import android.widget.ImageView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.NIMSDK;
import com.netease.nimlib.sdk.Observer;
......@@ -40,6 +41,7 @@ import com.netease.nimlib.sdk.msg.model.TeamMessageReceipt;
import com.netease.nimlib.sdk.robot.model.RobotAttachment;
import com.netease.nimlib.sdk.team.constant.TeamMemberType;
import com.netease.nimlib.sdk.team.model.TeamMember;
import com.ydl.ydlcommon.app.Apm;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.session.extension.CustomAttachLingxiWhichQuestion;
......@@ -838,7 +840,23 @@ public class MessageListPanelEx {
public void doOkAction() {
// 正常情况收到消息后附件会自动下载。如果下载失败,可调用该接口重新下载
if (message.getAttachment() != null && message.getAttachment() instanceof FileAttachment)
NIMClient.getService(MsgService.class).downloadAttachment(message, true);
NIMClient.getService(MsgService.class).downloadAttachment(message, true)
.setCallback(new RequestCallback<Void>() {
@Override
public void onSuccess(Void o) {
}
@Override
public void onFailed(int i) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", new Exception(String.valueOf(i)));
}
@Override
public void onException(Throwable throwable) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", throwable);
}
});
}
};
......@@ -1145,6 +1163,8 @@ public class MessageListPanelEx {
@Override
public void onFailed(int code) {
String sessionId = item.getSessionId();
Apm.INSTANCE.reportCustom("yx_revoke_error", "sessionId:" + sessionId, new Exception(String.valueOf(code)));
if (code == ResponseCode.RES_OVERDUE) {
ToastHelper.showToast(container.activity, R.string.im_revoke_failed);
} else {
......
......@@ -10,18 +10,20 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.msg.MsgService;
import com.netease.nimlib.sdk.msg.attachment.AudioAttachment;
import com.netease.nimlib.sdk.msg.constant.AttachStatusEnum;
import com.netease.nimlib.sdk.msg.constant.MsgDirectionEnum;
import com.netease.nimlib.sdk.msg.constant.MsgStatusEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.app.Apm;
import com.yidianling.im.R;
import com.yidianling.nimbase.business.session.audio.MessageAudioControl;
import com.yidianling.nimbase.common.media.audioplayer.Playable;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
import com.yidianling.nimbase.common.util.sys.ScreenUtil;
import com.yidianling.nimbase.common.util.sys.TimeUtil;
import com.yidianling.im.R;
import com.yidianling.uikit.api.NimUIKitImpl;
/**
......@@ -71,7 +73,24 @@ public class MsgViewHolderAudio extends MsgViewHolderBase {
if (audioControl != null) {
if (message.getDirect() == MsgDirectionEnum.In && message.getAttachStatus() != AttachStatusEnum.transferred) {
if (message.getAttachStatus() == AttachStatusEnum.fail || message.getAttachStatus() == AttachStatusEnum.def) {
NIMClient.getService(MsgService.class).downloadAttachment(message, false);
NIMClient.getService(MsgService.class).downloadAttachment(message, false)
.setCallback(new RequestCallback<Void>() {
@Override
public void onSuccess(Void o) {
}
@Override
public void onFailed(int i) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", new Exception(String.valueOf(i)));
}
@Override
public void onException(Throwable throwable) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", throwable);
}
});
}
return;
}
......
......@@ -13,12 +13,14 @@ import android.widget.TextView;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.NIMSDK;
import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.msg.MsgService;
import com.netease.nimlib.sdk.msg.attachment.FileAttachment;
import com.netease.nimlib.sdk.msg.constant.MsgDirectionEnum;
import com.netease.nimlib.sdk.msg.constant.MsgStatusEnum;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.app.Apm;
import com.yidianling.im.R;
import com.yidianling.nimbase.common.ui.imageview.HeadImageView;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
......@@ -140,7 +142,23 @@ public abstract class MsgViewHolderBase extends RecyclerViewHolder<BaseMultiItem
*/
protected void downloadAttachment() {
if (message.getAttachment() != null && message.getAttachment() instanceof FileAttachment)
NIMClient.getService(MsgService.class).downloadAttachment(message, true);
NIMClient.getService(MsgService.class).downloadAttachment(message, true)
.setCallback(new RequestCallback<Void>() {
@Override
public void onSuccess(Void o) {
}
@Override
public void onFailed(int i) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", new Exception(String.valueOf(i)));
}
@Override
public void onException(Throwable throwable) {
Apm.INSTANCE.reportCustom("yx_attchment_error", "", throwable);
}
});
}
// 设置FrameLayout子控件的gravity参数
......
......@@ -12,6 +12,7 @@ import android.view.View
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import com.blankj.utilcode.util.ToastUtils
import com.mobile.auth.gatewayauth.*
import com.mobile.auth.gatewayauth.model.TokenRet
import com.ydl.ydlcommon.base.BaseActivity
......@@ -535,6 +536,7 @@ object OneKeyLoginHelp {
// }
}
else -> { // 其它失败原因
ToastUtils.showShort("您的网络环境较差,请输入手机号码进行登录。")
mPhoneNumberAuthHelper?.hideLoginLoading()
// 跳转到原生登录界面
mActivity.runOnUiThread {
......
package com.ydl.ydlcommon.app
import android.content.Context
import com.apm.insight.MonitorCrash
import com.apm.insight.log.VLog
import com.bytedance.apm.insight.ApmInsight
import com.bytedance.apm.insight.ApmInsightInitConfig
import com.bytedance.apm.insight.IDynamicParams
import com.meituan.android.walle.WalleChannelReader
object Apm {
private var crash: MonitorCrash? = null
fun initApm(context: Context, appId: String, vCode: Long, vName: String, debug: Boolean, uidCall: () -> String?) {
val channel = if (debug) "debug" else WalleChannelReader.getChannel(context)
crash = MonitorCrash.init(
context,
appId,
vCode,
vName
)
crash?.config()?.setChannel(channel)
val builder = ApmInsightInitConfig.builder()
.aid(appId)
//.batteryMonitor(true)
//.cpuMonitor(true)
//.fpsMonitor(true)
//.seriousBlockDetect(true)
.blockDetect(true)
// .enableWebViewMonitor(true)
.channel(channel)
.debugMode(debug)
.enableLogRecovery(true)
.setDynamicParams(ApmParams(crash, uidCall))
ApmInsight.getInstance().init(context, builder.build())
VLog.init(context, 20)
}
fun reportCustom(type: String, msg: String, throwable: Throwable) {
crash?.reportCustomErr(msg, type, throwable)
}
}
private class ApmParams(val crash: MonitorCrash?, val uidCall: () -> String?) : IDynamicParams() {
override fun getUserUniqueID(): String? {
return null
}
override fun getAbSdkVersion(): String? {
return null
}
override fun getSsid(): String? {
return null
}
override fun getDid(): String? {
return null
}
override fun getUserId(): String? {
val uid = uidCall.invoke()
crash?.config()?.setUID(uid)
return uid
}
}
\ No newline at end of file
......@@ -4,7 +4,9 @@ import android.annotation.SuppressLint
import android.content.Context
import android.text.TextUtils
import com.facebook.stetho.okhttp3.StethoInterceptor
import com.google.gson.Gson
import com.ydl.pushserver.pushagent.YdlPushAgent
import com.ydl.ydlcommon.app.Apm
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.bean.AuthBean
import com.ydl.ydlcommon.bean.GatewayRequestDTO
......@@ -15,6 +17,7 @@ import com.ydl.ydlcommon.data.http.GsonProvider
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.api.ApiRequestUtil
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunLogConfig
......@@ -23,7 +26,6 @@ import com.ydl.ydlnet.builder.config.OkHttpConfig
import com.ydl.ydlnet.builder.factory.ApiFactory
import com.ydl.ydlnet.builder.interceptor.log.RequestHandler
import com.ydl.ydlnet.builder.interceptor.log.RequestLogInterceptor
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.ToastUtil
......@@ -31,6 +33,8 @@ import io.reactivex.functions.Action
import okhttp3.*
import okio.Buffer
import okio.BufferedSink
import java.io.EOFException
import java.nio.charset.Charset
import java.util.*
import kotlin.collections.ArrayList
import kotlin.collections.HashMap
......@@ -141,7 +145,8 @@ class HttpConfig {
commonParams(),
requestHead(appName),
addEncryptionHeaderParamsInterceptor(),
responseErrorInterceptor()
responseErrorInterceptor(),
respErrorInterceptor()
)
.setRequestHandler(getRequestHandler())
.setReadTimeout(15)
......@@ -183,6 +188,53 @@ class HttpConfig {
}
}
private fun respErrorInterceptor(): Interceptor {
return Interceptor {
val req = it.request()
val resp = it.proceed(req)
if (appDebug) return@Interceptor resp
val code = resp.code()
val message = resp.message()
val api = req.url().encodedPath()
if (!resp.isSuccessful) {
Apm.reportCustom("network_request_error", "${api}(${code},${message})", Exception("${api}(${code},${message})"))
} else {
try {
val body = resp.body() ?: return@Interceptor resp
val buffer = body.source().buffer()
if(!isPlaintext(buffer)) return@Interceptor resp
val readString = buffer.clone().readString(Charset.forName("UTF-8"))
val fromJson = Gson().fromJson<BaseAPIResponse<Any>>(readString, BaseAPIResponse::class.java)
if (fromJson.code != "200") {
Apm.reportCustom("network_business_error", "${api}(${fromJson.code},${fromJson.msg})", Exception("${api}(${fromJson.code},${fromJson.msg})"))
}
} catch (throwable: Throwable) {
LogUtil.e(throwable.message)
}
}
return@Interceptor resp
}
}
private fun isPlaintext(buffer: Buffer): Boolean {
return try {
val prefix = Buffer()
val byteCount = if (buffer.size() < 64L) buffer.size() else 64L
buffer.copyTo(prefix, 0L, byteCount)
var i = 0
while (i < 16 && !prefix.exhausted()) {
val codePoint = prefix.readUtf8CodePoint()
if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
return false
}
++i
}
true
} catch (var6: EOFException) {
false
}
}
/**
* 接口返回错误日志埋点
*/
......
......@@ -3,7 +3,6 @@ package com.ydl.webview;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
......@@ -35,7 +34,6 @@ import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.ydl.event.ReloadUrlEvent;
import com.ydl.utils.PopUtils;
import com.ydl.utils.ProxyCheckUtils;
import com.ydl.utils.WebUrlParamsUtils;
......@@ -1388,7 +1386,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
super.onDestroy();
cancelSendNetLossMessage();
EventBus.getDefault().unregister(this);
super.onDestroy();
if (wv_content != null) {
wv_content.destroy();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment