Commit 928a7d43 by 刘鹏

Merge remote-tracking branch 'origin/release' into d/v4.3.92

# Conflicts:
#	config.gradle
parents 9a236f85 568bed43
...@@ -9,9 +9,9 @@ ext { ...@@ -9,9 +9,9 @@ ext {
"m-consultant" : "0.0.60.23", "m-consultant" : "0.0.60.23",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.08", "m-user" : "0.0.62.08",
"m-home" : "0.0.23.45", "m-home" : "0.0.23.48",
"m-im" : "0.0.21.33", "m-im" : "0.0.21.42",
"m-dynamic" : "0.0.7.49", "m-dynamic" : "0.0.7.72",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.40.99", "ydl-platform" : "0.0.40.99",
...@@ -94,9 +94,9 @@ ext { ...@@ -94,9 +94,9 @@ ext {
"m-consultant" : "0.0.60.23", "m-consultant" : "0.0.60.23",
"m-fm" : "0.0.30.08", "m-fm" : "0.0.30.08",
"m-user" : "0.0.62.08", "m-user" : "0.0.62.08",
"m-home" : "0.0.23.45", "m-home" : "0.0.23.48",
"m-im" : "0.0.21.33", "m-im" : "0.0.21.42",
"m-dynamic" : "0.0.7.49", "m-dynamic" : "0.0.7.72",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
"m-muse" : "0.0.28.28", "m-muse" : "0.0.28.28",
...@@ -116,7 +116,7 @@ ext { ...@@ -116,7 +116,7 @@ ext {
"m-dynamic-api" : "0.0.3.71", "m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.40.99", "ydl-platform" : "0.0.40.99",
......
...@@ -242,7 +242,7 @@ class ExpertSearchAdapter( ...@@ -242,7 +242,7 @@ class ExpertSearchAdapter(
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C)) view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.color_EB892C))
}else{ }else{
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1) view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_E0E0E0)) view.tvTag.setTextColor(ContextCompat.getColor(context,R.color.platform_color_666666))
} }
holder.ll_tags.addView(view) holder.ll_tags.addView(view)
} }
......
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
android:gravity="center" android:gravity="center"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:padding="3dp" android:padding="3dp"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_666666"
android:textSize="10sp" android:textSize="10sp"
tools:text="恋爱情感" /> tools:text="恋爱情感" />
...@@ -34,7 +34,7 @@ class HomeBIConstants { ...@@ -34,7 +34,7 @@ class HomeBIConstants {
const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击 const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击
const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多 const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多
const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域 const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域
const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit "//首页浏览事件 const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit"//首页浏览事件
const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 首页咨询分类点击私聊按钮 const val YDL_PRIVATE_CHAT_CLICK: String = YDL_USER_MAIN_PAGE + "private_chat_click" // 首页咨询分类点击私聊按钮
const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长 const val YDL_HOME_DWELL_TIME: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_stay_visit" // 首页停留时长
const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想 const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想
......
...@@ -379,6 +379,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -379,6 +379,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
super.onResume() super.onResume()
startTime=System.currentTimeMillis() startTime=System.currentTimeMillis()
if (userVisibleHint) { if (userVisibleHint) {
ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT)
if (isFromCreate) { if (isFromCreate) {
isFromCreate = false isFromCreate = false
mPresenter?.loadHomeData() mPresenter?.loadHomeData()
......
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.text.* import android.text.*
import android.text.style.ForegroundColorSpan
import android.text.style.ImageSpan import android.text.style.ImageSpan
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.MoonUtil import com.ydl.ydlcommon.utils.MoonUtil
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeAskBean import com.yidianling.home.model.bean.HomeAskBean
...@@ -77,7 +71,10 @@ class HomeAssuageGriefItemView( ...@@ -77,7 +71,10 @@ class HomeAssuageGriefItemView(
homeModuleAssuageGriefViewBottomLine.visibility = View.VISIBLE homeModuleAssuageGriefViewBottomLine.visibility = View.VISIBLE
homeModuleAssuageGriefViewBottomBtn.visibility = View.GONE homeModuleAssuageGriefViewBottomBtn.visibility = View.GONE
} }
ll_topic_detail.setOnClickListener {
//跳转话题详情
homeEvent?.jumpToTopicDetail(bean.topicId.toString())
}
/** /**
* 点赞 * 点赞
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
android:layout_marginTop="@dimen/platform_dp_12" android:layout_marginTop="@dimen/platform_dp_12"
android:gravity="center_vertical"> android:gravity="center_vertical">
<LinearLayout <LinearLayout
android:id="@+id/ll_topic_detail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="28dp" android:layout_height="28dp"
android:orientation="horizontal" android:orientation="horizontal"
......
...@@ -84,10 +84,10 @@ dependencies { ...@@ -84,10 +84,10 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'com.ydl:nim-base:1.1.0.3' implementation 'com.ydl:nim-base:1.1.0.4'
// implementation 'com.netease.nimlib:basesdk:8.5.0' // implementation 'com.netease.nimlib:basesdk:8.5.0'
implementation 'com.netease.nimlib:avchat:8.7.2' implementation 'com.netease.nimlib:avchat:9.1.1'
implementation 'com.netease.nimlib:nrtc:8.7.2' implementation 'com.netease.nimlib:nrtc:9.1.1'
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"] implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
......
...@@ -88,6 +88,8 @@ public class MPermission extends BaseMPermission { ...@@ -88,6 +88,8 @@ public class MPermission extends BaseMPermission {
} }
private static void dispatchResult(Object obj, int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { private static void dispatchResult(Object obj, int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
//处理权限异常
try {
List<String> deniedPermissions = new ArrayList<>(); List<String> deniedPermissions = new ArrayList<>();
for (int i = 0; i < grantResults.length; i++) { for (int i = 0; i < grantResults.length; i++) {
if (grantResults[i] != PackageManager.PERMISSION_GRANTED) { if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {
...@@ -104,6 +106,9 @@ public class MPermission extends BaseMPermission { ...@@ -104,6 +106,9 @@ public class MPermission extends BaseMPermission {
} else { } else {
doExecuteSuccess(obj, requestCode); doExecuteSuccess(obj, requestCode);
} }
} catch (Exception e) {
e.printStackTrace();
}
} }
/** /**
......
...@@ -2,6 +2,7 @@ package com.yidianling.im.config.provider ...@@ -2,6 +2,7 @@ package com.yidianling.im.config.provider
import android.content.Context import android.content.Context
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.netease.nimlib.sdk.msg.model.IMMessage
import com.netease.nimlib.sdk.uinfo.model.UserInfo import com.netease.nimlib.sdk.uinfo.model.UserInfo
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.yidianling.uikit.api.wrapper.NimUserInfoProvider import com.yidianling.uikit.api.wrapper.NimUserInfoProvider
...@@ -31,4 +32,8 @@ class CustomUserInfoProvider(context:Context) : NimUserInfoProvider(context) { ...@@ -31,4 +32,8 @@ class CustomUserInfoProvider(context:Context) : NimUserInfoProvider(context) {
override fun getDisplayNameForMessageNotifier(account: String?, sessionId: String?, sessionType: SessionTypeEnum?): String { override fun getDisplayNameForMessageNotifier(account: String?, sessionId: String?, sessionType: SessionTypeEnum?): String {
return UserInfoCache.getInstance().getUser(account).nickName return UserInfoCache.getInstance().getUser(account).nickName
} }
override fun getDisplayTitleForMessageNotifier(p0: IMMessage?): String {
return ""
}
} }
...@@ -17,11 +17,9 @@ import com.netease.nimlib.sdk.msg.model.IMMessage; ...@@ -17,11 +17,9 @@ import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.data.http.RxUtils; import com.ydl.ydlcommon.data.http.RxUtils;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.config.constants.ImConstants; import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.helper.IMChatUtil;
import com.yidianling.im.http.ImRetrofitApi; import com.yidianling.im.http.ImRetrofitApi;
import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder; import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone; import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
...@@ -51,7 +49,6 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -51,7 +49,6 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
public String orderId; public String orderId;
/***0 未确认 1已确认*/ /***0 未确认 1已确认*/
public int flag; public int flag;
public boolean isSureed = false;//是否已确认
public MsgViewHolderOrderAlreadyDone(BaseMultiItemFetchLoadAdapter adapter) { public MsgViewHolderOrderAlreadyDone(BaseMultiItemFetchLoadAdapter adapter) {
...@@ -129,8 +126,14 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -129,8 +126,14 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
.subscribe(it -> { .subscribe(it -> {
//确认完成,按钮置灰,更新本地消息 //确认完成,按钮置灰,更新本地消息
updateLocalMsg(); updateLocalMsg();
}, throwable -> }, throwable ->{
ToastUtil.toastShort(throwable.getMessage()) if(throwable.getMessage().contains("非已服务待确认")){
updateLocalMsg();
onItemClick();
}else {
ToastUtil.toastShort(throwable.getMessage());
}
}
); );
}); });
...@@ -152,19 +155,18 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase { ...@@ -152,19 +155,18 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
updateSureView("已确认"); updateSureView("已确认");
} }
} else { } else {
isSureed = false;
tv_submit.setText("确认"); tv_submit.setText("确认");
tv_submit.setEnabled(true); tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12)); tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
} }
} else { } else {
isSureed = false;
tv_submit.setText("确认"); tv_submit.setText("确认");
tv_submit.setEnabled(true); tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12)); tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
} }
hideItemBg(); hideItemBg();
......
...@@ -86,10 +86,15 @@ class NewMultiMessageFragment : BaseFragment() { ...@@ -86,10 +86,15 @@ class NewMultiMessageFragment : BaseFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
getMsgData() getMsgData()
try {
NIMClient.getService(MsgService::class.java).setChattingAccount( NIMClient.getService(MsgService::class.java).setChattingAccount(
MsgService.MSG_CHATTING_ACCOUNT_NONE, MsgService.MSG_CHATTING_ACCOUNT_NONE,
SessionTypeEnum.None SessionTypeEnum.None
) )
} catch (e: Exception) {
e.printStackTrace()
}
} }
override fun onPause() { override fun onPause() {
......
...@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable; ...@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable;
import android.text.TextUtils; import android.text.TextUtils;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.team.model.Team; import com.netease.nimlib.sdk.team.model.Team;
import com.netease.nimlib.sdk.uinfo.UserInfoProvider; import com.netease.nimlib.sdk.uinfo.UserInfoProvider;
import com.netease.nimlib.sdk.uinfo.model.UserInfo; import com.netease.nimlib.sdk.uinfo.model.UserInfo;
...@@ -62,6 +63,11 @@ public class NimUserInfoProvider implements UserInfoProvider { ...@@ -62,6 +63,11 @@ public class NimUserInfoProvider implements UserInfoProvider {
} }
@Override @Override
public String getDisplayTitleForMessageNotifier(IMMessage imMessage) {
return null;
}
@Override
public String getDisplayNameForMessageNotifier(String account, String sessionId, SessionTypeEnum sessionType) { public String getDisplayNameForMessageNotifier(String account, String sessionId, SessionTypeEnum sessionType) {
String nick = null; String nick = null;
if (sessionType == SessionTypeEnum.P2P) { if (sessionType == SessionTypeEnum.P2P) {
......
...@@ -107,7 +107,7 @@ class UserMyPageEvent{ ...@@ -107,7 +107,7 @@ class UserMyPageEvent{
const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击 const val YDL_USER_RADIO_PLAY_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_radio_play_click"//心灵电台play按钮点击
const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多 const val YDL_USER_ARTICLE_MORE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_more_click"//文章阅读更多
const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域 const val YDL_USER_ARTICLE_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_article_click"//文章标题图区域
const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit "//首页浏览事件 const val YDL_USER_MAIN_PAGE_VISIT: String = YDL_USER_MAIN_PAGE + "ydl_user_main_page_visit"//首页浏览事件
} }
} }
......
...@@ -7,172 +7,246 @@ import com.tencent.qcloud.tuicore.TUIConfig; ...@@ -7,172 +7,246 @@ import com.tencent.qcloud.tuicore.TUIConfig;
public class ErrorMessageConverter { public class ErrorMessageConverter {
public static String convertIMError(int code, String msg) { public static String convertIMError(int code, String msg) {
try {
switch (code) { switch (code) {
case BaseConstants.ERR_IN_PROGESS: case BaseConstants.ERR_IN_PROGESS:
return getLocalizedString(R.string.TUIKitErrorInProcess); // @"执行中"; // @"执行中"
return getLocalizedString(R.string.TUIKitErrorInProcess);
case BaseConstants.ERR_INVALID_PARAMETERS: case BaseConstants.ERR_INVALID_PARAMETERS:
return getLocalizedString(R.string.TUIKitErrorInvalidParameters);// @"参数无效"; // @"参数无效";
return getLocalizedString(R.string.TUIKitErrorInvalidParameters);
case BaseConstants.ERR_IO_OPERATION_FAILED: case BaseConstants.ERR_IO_OPERATION_FAILED:
return getLocalizedString(R.string.TUIKitErrorIOOperateFaild); // @"操作本地 IO 错误"; // @"操作本地 IO 错误";
return getLocalizedString(R.string.TUIKitErrorIOOperateFaild);
case BaseConstants.ERR_INVALID_JSON: case BaseConstants.ERR_INVALID_JSON:
return getLocalizedString(R.string.TUIKitErrorInvalidJson); // @"错误的 JSON 格式"; // @"错误的 JSON 格式";
return getLocalizedString(R.string.TUIKitErrorInvalidJson);
case BaseConstants.ERR_OUT_OF_MEMORY: case BaseConstants.ERR_OUT_OF_MEMORY:
return getLocalizedString(R.string.TUIKitErrorOutOfMemory); // @"内存不足"; // @"内存不足";
return getLocalizedString(R.string.TUIKitErrorOutOfMemory);
case BaseConstants.ERR_PARSE_RESPONSE_FAILED: case BaseConstants.ERR_PARSE_RESPONSE_FAILED:
return getLocalizedString(R.string.TUIKitErrorParseResponseFaild); // @"PB 解析失败"; // @"PB 解析失败";
return getLocalizedString(R.string.TUIKitErrorParseResponseFaild);
case BaseConstants.ERR_SERIALIZE_REQ_FAILED: case BaseConstants.ERR_SERIALIZE_REQ_FAILED:
return getLocalizedString(R.string.TUIKitErrorSerializeReqFaild); // @"PB 序列化失败"; // @"PB 序列化失败";
return getLocalizedString(R.string.TUIKitErrorSerializeReqFaild);
case BaseConstants.ERR_SDK_NOT_INITIALIZED: case BaseConstants.ERR_SDK_NOT_INITIALIZED:
return getLocalizedString(R.string.TUIKitErrorSDKNotInit); // @"IM SDK 未初始化"; // @"IM SDK 未初始化";
return getLocalizedString(R.string.TUIKitErrorSDKNotInit);
case BaseConstants.ERR_LOADMSG_FAILED: case BaseConstants.ERR_LOADMSG_FAILED:
return getLocalizedString(R.string.TUIKitErrorLoadMsgFailed); // @"加载本地数据库操作失败"; // @"加载本地数据库操作失败";
return getLocalizedString(R.string.TUIKitErrorLoadMsgFailed);
case BaseConstants.ERR_DATABASE_OPERATE_FAILED: case BaseConstants.ERR_DATABASE_OPERATE_FAILED:
return getLocalizedString(R.string.TUIKitErrorDatabaseOperateFailed); // @"本地数据库操作失败"; // @"本地数据库操作失败";
return getLocalizedString(R.string.TUIKitErrorDatabaseOperateFailed);
case BaseConstants.ERR_SDK_COMM_CROSS_THREAD: case BaseConstants.ERR_SDK_COMM_CROSS_THREAD:
return getLocalizedString(R.string.TUIKitErrorCrossThread); // @"跨线程错误"; // @"跨线程错误";
return getLocalizedString(R.string.TUIKitErrorCrossThread);
case BaseConstants.ERR_SDK_COMM_TINYID_EMPTY: case BaseConstants.ERR_SDK_COMM_TINYID_EMPTY:
return getLocalizedString(R.string.TUIKitErrorTinyIdEmpty); // @"TinyId 为空"; // @"TinyId 为空";
return getLocalizedString(R.string.TUIKitErrorTinyIdEmpty);
case BaseConstants.ERR_SDK_COMM_INVALID_IDENTIFIER: case BaseConstants.ERR_SDK_COMM_INVALID_IDENTIFIER:
return getLocalizedString(R.string.TUIKitErrorInvalidIdentifier); // @"Identifier 非法"; // @"Identifier 非法";
return getLocalizedString(R.string.TUIKitErrorInvalidIdentifier);
case BaseConstants.ERR_SDK_COMM_FILE_NOT_FOUND: case BaseConstants.ERR_SDK_COMM_FILE_NOT_FOUND:
return getLocalizedString(R.string.TUIKitErrorFileNotFound); // @"文件不存在"; // @"文件不存在";
return getLocalizedString(R.string.TUIKitErrorFileNotFound);
case BaseConstants.ERR_SDK_COMM_FILE_TOO_LARGE: case BaseConstants.ERR_SDK_COMM_FILE_TOO_LARGE:
return getLocalizedString(R.string.TUIKitErrorFileTooLarge); // @"文件大小超出了限制"; // @"文件大小超出了限制";
return getLocalizedString(R.string.TUIKitErrorFileTooLarge);
case BaseConstants.ERR_SDK_COMM_FILE_SIZE_EMPTY: case BaseConstants.ERR_SDK_COMM_FILE_SIZE_EMPTY:
return getLocalizedString(R.string.TUIKitErrorEmptyFile); // @"空文件"; // @"空文件";
return getLocalizedString(R.string.TUIKitErrorEmptyFile);
case BaseConstants.ERR_SDK_COMM_FILE_OPEN_FAILED: case BaseConstants.ERR_SDK_COMM_FILE_OPEN_FAILED:
return getLocalizedString(R.string.TUIKitErrorFileOpenFailed); // @"文件打开失败"; // @"文件打开失败";
return getLocalizedString(R.string.TUIKitErrorFileOpenFailed);
// 帐号错误码 // 帐号错误码
case BaseConstants.ERR_SDK_NOT_LOGGED_IN: case BaseConstants.ERR_SDK_NOT_LOGGED_IN:
return getLocalizedString(R.string.TUIKitErrorNotLogin); // @"IM SDK 未登录"; // @"IM SDK 未登录";
return getLocalizedString(R.string.TUIKitErrorNotLogin);
case BaseConstants.ERR_NO_PREVIOUS_LOGIN: case BaseConstants.ERR_NO_PREVIOUS_LOGIN:
return getLocalizedString(R.string.TUIKitErrorNoPreviousLogin); // @"并没有登录过该用户"; // @"并没有登录过该用户";
return getLocalizedString(R.string.TUIKitErrorNoPreviousLogin);
case BaseConstants.ERR_USER_SIG_EXPIRED: case BaseConstants.ERR_USER_SIG_EXPIRED:
return getLocalizedString(R.string.TUIKitErrorUserSigExpired); // @"UserSig 过期"; // @"UserSig 过期";
return getLocalizedString(R.string.TUIKitErrorUserSigExpired);
case BaseConstants.ERR_LOGIN_KICKED_OFF_BY_OTHER: case BaseConstants.ERR_LOGIN_KICKED_OFF_BY_OTHER:
return getLocalizedString(R.string.TUIKitErrorLoginKickedOffByOther); // @"其他终端登录同一个帐号"; // @"其他终端登录同一个帐号";
// case BaseConstants.ERR_LOGIN_IN_PROCESS: return getLocalizedString(R.string.TUIKitErrorLoginKickedOffByOther);
// return @"登录正在执行中"; // case BaseConstants.ERR_LOGIN_IN_PROCESS:
// case BaseConstants.ERR_LOGOUT_IN_PROCESS: // return @"登录正在执行中";
// return @"登出正在执行中"; // case BaseConstants.ERR_LOGOUT_IN_PROCESS:
// return @"登出正在执行中";
case BaseConstants.ERR_SDK_ACCOUNT_TLS_INIT_FAILED: case BaseConstants.ERR_SDK_ACCOUNT_TLS_INIT_FAILED:
return getLocalizedString(R.string.TUIKitErrorTLSSDKInit); // @"TLS SDK 初始化失败"; // @"TLS SDK 初始化失败";
return getLocalizedString(R.string.TUIKitErrorTLSSDKInit);
case BaseConstants.ERR_SDK_ACCOUNT_TLS_NOT_INITIALIZED: case BaseConstants.ERR_SDK_ACCOUNT_TLS_NOT_INITIALIZED:
return getLocalizedString(R.string.TUIKitErrorTLSSDKUninit); // @"TLS SDK 未初始化"; // @"TLS SDK 未初始化";
return getLocalizedString(R.string.TUIKitErrorTLSSDKUninit);
case BaseConstants.ERR_SDK_ACCOUNT_TLS_TRANSPKG_ERROR: case BaseConstants.ERR_SDK_ACCOUNT_TLS_TRANSPKG_ERROR:
return getLocalizedString(R.string.TUIKitErrorTLSSDKTRANSPackageFormat); // @"TLS SDK TRANS 包格式错误"; // @"TLS SDK TRANS 包格式错误";
return getLocalizedString(R.string.TUIKitErrorTLSSDKTRANSPackageFormat);
case BaseConstants.ERR_SDK_ACCOUNT_TLS_DECRYPT_FAILED: case BaseConstants.ERR_SDK_ACCOUNT_TLS_DECRYPT_FAILED:
return getLocalizedString(R.string.TUIKitErrorTLSDecrypt); // @"TLS SDK 解密失败"; // @"TLS SDK 解密失败";
return getLocalizedString(R.string.TUIKitErrorTLSDecrypt);
case BaseConstants.ERR_SDK_ACCOUNT_TLS_REQUEST_FAILED: case BaseConstants.ERR_SDK_ACCOUNT_TLS_REQUEST_FAILED:
return getLocalizedString(R.string.TUIKitErrorTLSSDKRequest); // @"TLS SDK 请求失败"; // @"TLS SDK 请求失败";
return getLocalizedString(R.string.TUIKitErrorTLSSDKRequest);
case BaseConstants.ERR_SDK_ACCOUNT_TLS_REQUEST_TIMEOUT: case BaseConstants.ERR_SDK_ACCOUNT_TLS_REQUEST_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorTLSSDKRequestTimeout); // @"TLS SDK 请求超时"; // @"TLS SDK 请求超时";
return getLocalizedString(R.string.TUIKitErrorTLSSDKRequestTimeout);
// 消息错误码 // 消息错误码
case BaseConstants.ERR_INVALID_CONVERSATION: case BaseConstants.ERR_INVALID_CONVERSATION:
return getLocalizedString(R.string.TUIKitErrorInvalidConveration); // @"会话无效"; // @"会话无效";
return getLocalizedString(R.string.TUIKitErrorInvalidConveration);
case BaseConstants.ERR_FILE_TRANS_AUTH_FAILED: case BaseConstants.ERR_FILE_TRANS_AUTH_FAILED:
return getLocalizedString(R.string.TUIKitErrorFileTransAuthFailed); // @"文件传输鉴权失败"; // @"文件传输鉴权失败";
return getLocalizedString(R.string.TUIKitErrorFileTransAuthFailed);
case BaseConstants.ERR_FILE_TRANS_NO_SERVER: case BaseConstants.ERR_FILE_TRANS_NO_SERVER:
return getLocalizedString(R.string.TUIKitErrorFileTransNoServer); // @"文件传输获取 Server 列表失败"; // @"文件传输获取 Server 列表失败";
return getLocalizedString(R.string.TUIKitErrorFileTransNoServer);
case BaseConstants.ERR_FILE_TRANS_UPLOAD_FAILED: case BaseConstants.ERR_FILE_TRANS_UPLOAD_FAILED:
return getLocalizedString(R.string.TUIKitErrorFileTransUploadFailed); // @"文件传输上传失败,请检查网络是否连接"; // @"文件传输上传失败,请检查网络是否连接";
// case BaseConstants.ERR_IMAGE_UPLOAD_FAILED_NOTIMAGE: return getLocalizedString(R.string.TUIKitErrorFileTransUploadFailed);
// return TUIKitLocalizableString(R.string.TUIKitErrorFileTransUploadFailedNotImage); // @"文件传输上传失败,请检查上传的图片是否能够正常打开"; // case BaseConstants.ERR_IMAGE_UPLOAD_FAILED_NOTIMAGE:
// return TUIKitLocalizableString(R.string.TUIKitErrorFileTransUploadFailedNotImage); // @"文件传输上传失败,请检查上传的图片是否能够正常打开";
case BaseConstants.ERR_FILE_TRANS_DOWNLOAD_FAILED: case BaseConstants.ERR_FILE_TRANS_DOWNLOAD_FAILED:
return getLocalizedString(R.string.TUIKitErrorFileTransDownloadFailed); // @"文件传输下载失败,请检查网络,或者文件、语音是否已经过期"; // @"文件传输下载失败,请检查网络,或者文件、语音是否已经过期";
return getLocalizedString(R.string.TUIKitErrorFileTransDownloadFailed);
case BaseConstants.ERR_HTTP_REQ_FAILED: case BaseConstants.ERR_HTTP_REQ_FAILED:
return getLocalizedString(R.string.TUIKitErrorHTTPRequestFailed); // @"HTTP 请求失败"; // @"HTTP 请求失败";
return getLocalizedString(R.string.TUIKitErrorHTTPRequestFailed);
case BaseConstants.ERR_INVALID_MSG_ELEM: case BaseConstants.ERR_INVALID_MSG_ELEM:
return getLocalizedString(R.string.TUIKitErrorInvalidMsgElem); // @"IM SDK 无效消息 elem"; // @"IM SDK 无效消息 elem";
return getLocalizedString(R.string.TUIKitErrorInvalidMsgElem);
case BaseConstants.ERR_INVALID_SDK_OBJECT: case BaseConstants.ERR_INVALID_SDK_OBJECT:
return getLocalizedString(R.string.TUIKitErrorInvalidSDKObject); // @"无效的对象"; // @"无效的对象";
return getLocalizedString(R.string.TUIKitErrorInvalidSDKObject);
case BaseConstants.ERR_SDK_MSG_BODY_SIZE_LIMIT: case BaseConstants.ERR_SDK_MSG_BODY_SIZE_LIMIT:
return getLocalizedString(R.string.TUIKitSDKMsgBodySizeLimit); // @"消息长度超出限制"; // @"消息长度超出限制";
return getLocalizedString(R.string.TUIKitSDKMsgBodySizeLimit);
case BaseConstants.ERR_SDK_MSG_KEY_REQ_DIFFER_RSP: case BaseConstants.ERR_SDK_MSG_KEY_REQ_DIFFER_RSP:
return getLocalizedString(R.string.TUIKitErrorSDKMsgKeyReqDifferRsp); // @"消息 KEY 错误"; // @"消息 KEY 错误";
return getLocalizedString(R.string.TUIKitErrorSDKMsgKeyReqDifferRsp);
// 群组错误码 // 群组错误码
case BaseConstants.ERR_SDK_GROUP_INVALID_ID: case BaseConstants.ERR_SDK_GROUP_INVALID_ID:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidID); // @"群组 ID 非法,自定义群组 ID 必须为可打印 ASCII 字符(0x20-0x7e),最长48个字节,且前缀不能为 @TGS#"; // @"群组 ID 非法,自定义群组 ID 必须为可打印 ASCII 字符(0x20-0x7e),最长48个字节,且前缀不能为 @TGS#";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidID);
case BaseConstants.ERR_SDK_GROUP_INVALID_NAME: case BaseConstants.ERR_SDK_GROUP_INVALID_NAME:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidName); // @"群名称非法,群名称最长30字节"; // @"群名称非法,群名称最长30字节";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidName);
case BaseConstants.ERR_SDK_GROUP_INVALID_INTRODUCTION: case BaseConstants.ERR_SDK_GROUP_INVALID_INTRODUCTION:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidIntroduction); // @"群简介非法,群简介最长240字节"; // @"群简介非法,群简介最长240字节";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidIntroduction);
case BaseConstants.ERR_SDK_GROUP_INVALID_NOTIFICATION: case BaseConstants.ERR_SDK_GROUP_INVALID_NOTIFICATION:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidNotification); // @"群公告非法,群公告最长300字节"; // @"群公告非法,群公告最长300字节";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidNotification);
case BaseConstants.ERR_SDK_GROUP_INVALID_FACE_URL: case BaseConstants.ERR_SDK_GROUP_INVALID_FACE_URL:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidFaceURL); // @"群头像 URL 非法,群头像 URL 最长100字节"; // @"群头像 URL 非法,群头像 URL 最长100字节";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidFaceURL);
case BaseConstants.ERR_SDK_GROUP_INVALID_NAME_CARD: case BaseConstants.ERR_SDK_GROUP_INVALID_NAME_CARD:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidNameCard); // @"群名片非法,群名片最长50字节"; // @"群名片非法,群名片最长50字节";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInvalidNameCard);
case BaseConstants.ERR_SDK_GROUP_MEMBER_COUNT_LIMIT: case BaseConstants.ERR_SDK_GROUP_MEMBER_COUNT_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSDKGroupMemberCountLimit); // @"超过群组成员数的限制"; // @"超过群组成员数的限制";
return getLocalizedString(R.string.TUIKitErrorSDKGroupMemberCountLimit);
case BaseConstants.ERR_SDK_GROUP_JOIN_PRIVATE_GROUP_DENY: case BaseConstants.ERR_SDK_GROUP_JOIN_PRIVATE_GROUP_DENY:
return getLocalizedString(R.string.TUIKitErrorSDKGroupJoinPrivateGroupDeny); // @"不允许申请加入 Private 群组"; // @"不允许申请加入 Private 群组";
return getLocalizedString(R.string.TUIKitErrorSDKGroupJoinPrivateGroupDeny);
case BaseConstants.ERR_SDK_GROUP_INVITE_SUPER_DENY: case BaseConstants.ERR_SDK_GROUP_INVITE_SUPER_DENY:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInviteSuperDeny); // @"不允许邀请角色为群主的成员"; // @"不允许邀请角色为群主的成员";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInviteSuperDeny);
case BaseConstants.ERR_SDK_GROUP_INVITE_NO_MEMBER: case BaseConstants.ERR_SDK_GROUP_INVITE_NO_MEMBER:
return getLocalizedString(R.string.TUIKitErrorSDKGroupInviteNoMember); // @"不允许邀请0个成员"; // @"不允许邀请0个成员";
return getLocalizedString(R.string.TUIKitErrorSDKGroupInviteNoMember);
// 关系链错误码 // 关系链错误码
case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_PROFILE_KEY: case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_PROFILE_KEY:
return getLocalizedString(R.string.TUIKitErrorSDKFriendShipInvalidProfileKey); // @"资料字段非法"; // @"资料字段非法";
return getLocalizedString(R.string.TUIKitErrorSDKFriendShipInvalidProfileKey);
case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_REMARK: case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_REMARK:
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddRemark); // @"备注字段非法,最大96字节"; // @"备注字段非法,最大96字节";
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddRemark);
case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_WORDING: case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_WORDING:
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddWording); // @"请求添加好友的请求说明字段非法,最大120字节"; // @"请求添加好友的请求说明字段非法,最大120字节";
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddWording);
case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_SOURCE: case BaseConstants.ERR_SDK_FRIENDSHIP_INVALID_ADD_SOURCE:
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddSource); // @"请求添加好友的添加来源字段非法,来源需要添加“AddSource_Type_”前缀。"; // @"请求添加好友的添加来源字段非法,来源需要添加“AddSource_Type_”前缀。";
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipInvalidAddSource);
case BaseConstants.ERR_SDK_FRIENDSHIP_FRIEND_GROUP_EMPTY: case BaseConstants.ERR_SDK_FRIENDSHIP_FRIEND_GROUP_EMPTY:
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipFriendGroupEmpty); // @"好友分组字段非法,必须不为空,每个分组的名称最长30字节"; // @"好友分组字段非法,必须不为空,每个分组的名称最长30字节";
return getLocalizedString(R.string.TUIKitErrorSDKFriendshipFriendGroupEmpty);
// 网络 // 网络
case BaseConstants.ERR_SDK_NET_ENCODE_FAILED: case BaseConstants.ERR_SDK_NET_ENCODE_FAILED:
return getLocalizedString(R.string.TUIKitErrorSDKNetEncodeFailed); // @"SSO 加密失败"; // @"SSO 加密失败";
return getLocalizedString(R.string.TUIKitErrorSDKNetEncodeFailed);
case BaseConstants.ERR_SDK_NET_DECODE_FAILED: case BaseConstants.ERR_SDK_NET_DECODE_FAILED:
return getLocalizedString(R.string.TUIKitErrorSDKNetDecodeFailed); // @"SSO 解密失败"; // @"SSO 解密失败";
return getLocalizedString(R.string.TUIKitErrorSDKNetDecodeFailed);
case BaseConstants.ERR_SDK_NET_AUTH_INVALID: case BaseConstants.ERR_SDK_NET_AUTH_INVALID:
return getLocalizedString(R.string.TUIKitErrorSDKNetAuthInvalid); // @"SSO 未完成鉴权"; // @"SSO 未完成鉴权";
return getLocalizedString(R.string.TUIKitErrorSDKNetAuthInvalid);
case BaseConstants.ERR_SDK_NET_COMPRESS_FAILED: case BaseConstants.ERR_SDK_NET_COMPRESS_FAILED:
return getLocalizedString(R.string.TUIKitErrorSDKNetCompressFailed); // @"数据包压缩失败"; // @"数据包压缩失败";
return getLocalizedString(R.string.TUIKitErrorSDKNetCompressFailed);
case BaseConstants.ERR_SDK_NET_UNCOMPRESS_FAILED: case BaseConstants.ERR_SDK_NET_UNCOMPRESS_FAILED:
return getLocalizedString(R.string.TUIKitErrorSDKNetUncompressFaile); // @"数据包解压失败"; // @"数据包解压失败";
return getLocalizedString(R.string.TUIKitErrorSDKNetUncompressFaile);
case BaseConstants.ERR_SDK_NET_FREQ_LIMIT: case BaseConstants.ERR_SDK_NET_FREQ_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSDKNetFreqLimit); // @"调用频率限制,最大每秒发起 5 次请求。"; // @"调用频率限制,最大每秒发起 5 次请求。";
return getLocalizedString(R.string.TUIKitErrorSDKNetFreqLimit);
case BaseConstants.ERR_SDK_NET_REQ_COUNT_LIMIT: case BaseConstants.ERR_SDK_NET_REQ_COUNT_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSDKnetReqCountLimit); // @"请求队列満,超过同时请求的数量限制,最大同时发起1000个请求。"; // @"请求队列満,超过同时请求的数量限制,最大同时发起1000个请求。";
return getLocalizedString(R.string.TUIKitErrorSDKnetReqCountLimit);
case BaseConstants.ERR_SDK_NET_DISCONNECT: case BaseConstants.ERR_SDK_NET_DISCONNECT:
return getLocalizedString(R.string.TUIKitErrorSDKNetDisconnect); // @"网络已断开,未建立连接,或者建立 socket 连接时,检测到无网络。"; // @"网络已断开,未建立连接,或者建立 socket 连接时,检测到无网络。";
return getLocalizedString(R.string.TUIKitErrorSDKNetDisconnect);
case BaseConstants.ERR_SDK_NET_ALLREADY_CONN: case BaseConstants.ERR_SDK_NET_ALLREADY_CONN:
return getLocalizedString(R.string.TUIKitErrorSDKNetAllreadyConn); // @"网络连接已建立,重复创建连接"; // @"网络连接已建立,重复创建连接";
return getLocalizedString(R.string.TUIKitErrorSDKNetAllreadyConn);
case BaseConstants.ERR_SDK_NET_CONN_TIMEOUT: case BaseConstants.ERR_SDK_NET_CONN_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSDKNetConnTimeout); // @"建立网络连接超时,请等网络恢复后重试。"; // @"建立网络连接超时,请等网络恢复后重试。";
return getLocalizedString(R.string.TUIKitErrorSDKNetConnTimeout);
case BaseConstants.ERR_SDK_NET_CONN_REFUSE: case BaseConstants.ERR_SDK_NET_CONN_REFUSE:
return getLocalizedString(R.string.TUIKitErrorSDKNetConnRefuse); // @"网络连接已被拒绝,请求过于频繁,服务端拒绝服务。"; // @"网络连接已被拒绝,请求过于频繁,服务端拒绝服务。";
return getLocalizedString(R.string.TUIKitErrorSDKNetConnRefuse);
case BaseConstants.ERR_SDK_NET_NET_UNREACH: case BaseConstants.ERR_SDK_NET_NET_UNREACH:
return getLocalizedString(R.string.TUIKitErrorSDKNetNetUnreach); // @"没有到达网络的可用路由,请等网络恢复后重试。"; // @"没有到达网络的可用路由,请等网络恢复后重试。";
return getLocalizedString(R.string.TUIKitErrorSDKNetNetUnreach);
case BaseConstants.ERR_SDK_NET_SOCKET_NO_BUFF: case BaseConstants.ERR_SDK_NET_SOCKET_NO_BUFF:
return getLocalizedString(R.string.TUIKitErrorSDKNetSocketNoBuff); // @"系统中没有足够的缓冲区空间资源可用来完成调用,系统过于繁忙,内部错误。"; // @"系统中没有足够的缓冲区空间资源可用来完成调用,系统过于繁忙,内部错误。";
return getLocalizedString(R.string.TUIKitErrorSDKNetSocketNoBuff);
case BaseConstants.ERR_SDK_NET_RESET_BY_PEER: case BaseConstants.ERR_SDK_NET_RESET_BY_PEER:
return getLocalizedString(R.string.TUIKitERRORSDKNetResetByPeer); // @"对端重置了连接"; // @"对端重置了连接";
return getLocalizedString(R.string.TUIKitERRORSDKNetResetByPeer);
case BaseConstants.ERR_SDK_NET_SOCKET_INVALID: case BaseConstants.ERR_SDK_NET_SOCKET_INVALID:
return getLocalizedString(R.string.TUIKitErrorSDKNetSOcketInvalid); // @"socket 套接字无效"; // @"socket 套接字无效";
return getLocalizedString(R.string.TUIKitErrorSDKNetSOcketInvalid);
case BaseConstants.ERR_SDK_NET_HOST_GETADDRINFO_FAILED: case BaseConstants.ERR_SDK_NET_HOST_GETADDRINFO_FAILED:
return getLocalizedString(R.string.TUIKitErrorSDKNetHostGetAddressFailed); // @"IP 地址解析失败"; // @"IP 地址解析失败";
return getLocalizedString(R.string.TUIKitErrorSDKNetHostGetAddressFailed);
case BaseConstants.ERR_SDK_NET_CONNECT_RESET: case BaseConstants.ERR_SDK_NET_CONNECT_RESET:
return getLocalizedString(R.string.TUIKitErrorSDKNetConnectReset); // @"网络连接到中间节点或服务端重置"; // @"网络连接到中间节点或服务端重置";
return getLocalizedString(R.string.TUIKitErrorSDKNetConnectReset);
case BaseConstants.ERR_SDK_NET_WAIT_INQUEUE_TIMEOUT: case BaseConstants.ERR_SDK_NET_WAIT_INQUEUE_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitInQueueTimeout); // @"请求包等待进入待发送队列超时"; // @"请求包等待进入待发送队列超时";
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitInQueueTimeout);
case BaseConstants.ERR_SDK_NET_WAIT_SEND_TIMEOUT: case BaseConstants.ERR_SDK_NET_WAIT_SEND_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitSendTimeout); // @"请求包已进入待发送队列,等待进入系统的网络 buffer 超时"; // @"请求包已进入待发送队列,等待进入系统的网络 buffer 超时";
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitSendTimeout);
case BaseConstants.ERR_SDK_NET_WAIT_ACK_TIMEOUT: case BaseConstants.ERR_SDK_NET_WAIT_ACK_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitAckTimeut); // @"请求包已进入系统的网络 buffer ,等待服务端回包超时"; // @"请求包已进入系统的网络 buffer ,等待服务端回包超时";
return getLocalizedString(R.string.TUIKitErrorSDKNetWaitAckTimeut);
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// //
...@@ -183,95 +257,137 @@ public class ErrorMessageConverter { ...@@ -183,95 +257,137 @@ public class ErrorMessageConverter {
// SSO // SSO
case BaseConstants.ERR_SVR_SSO_CONNECT_LIMIT: case BaseConstants.ERR_SVR_SSO_CONNECT_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSDKSVRSSOConnectLimit); // @"SSO 的连接数量超出限制,服务端拒绝服务。"; // @"SSO 的连接数量超出限制,服务端拒绝服务。";
return getLocalizedString(R.string.TUIKitErrorSDKSVRSSOConnectLimit);
case BaseConstants.ERR_SVR_SSO_VCODE: case BaseConstants.ERR_SVR_SSO_VCODE:
return getLocalizedString(R.string.TUIKitErrorSDKSVRSSOVCode); // @"下发验证码标志错误。"; // @"下发验证码标志错误。";
return getLocalizedString(R.string.TUIKitErrorSDKSVRSSOVCode);
case BaseConstants.ERR_SVR_SSO_D2_EXPIRED: case BaseConstants.ERR_SVR_SSO_D2_EXPIRED:
return getLocalizedString(R.string.TUIKitErrorSVRSSOD2Expired); // @"D2 过期"; // @"D2 过期";
return getLocalizedString(R.string.TUIKitErrorSVRSSOD2Expired);
case BaseConstants.ERR_SVR_SSO_A2_UP_INVALID: case BaseConstants.ERR_SVR_SSO_A2_UP_INVALID:
return getLocalizedString(R.string.TUIKitErrorSVRA2UpInvalid); // @"A2 校验失败"; // @"A2 校验失败";
return getLocalizedString(R.string.TUIKitErrorSVRA2UpInvalid);
case BaseConstants.ERR_SVR_SSO_A2_DOWN_INVALID: case BaseConstants.ERR_SVR_SSO_A2_DOWN_INVALID:
return getLocalizedString(R.string.TUIKitErrorSVRA2DownInvalid); // @"处理下行包时发现 A2 验证没通过或者被安全打击。"; // @"处理下行包时发现 A2 验证没通过或者被安全打击。";
return getLocalizedString(R.string.TUIKitErrorSVRA2DownInvalid);
case BaseConstants.ERR_SVR_SSO_EMPTY_KEY: case BaseConstants.ERR_SVR_SSO_EMPTY_KEY:
return getLocalizedString(R.string.TUIKitErrorSVRSSOEmpeyKey); // @"不允许空 D2Key 加密。"; // @"不允许空 D2Key 加密。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOEmpeyKey);
case BaseConstants.ERR_SVR_SSO_UIN_INVALID: case BaseConstants.ERR_SVR_SSO_UIN_INVALID:
return getLocalizedString(R.string.TUIKitErrorSVRSSOUinInvalid); // @"D2 中的 uin 和 SSO 包头的 uin 不匹配。"; // @"D2 中的 uin 和 SSO 包头的 uin 不匹配。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOUinInvalid);
case BaseConstants.ERR_SVR_SSO_VCODE_TIMEOUT: case BaseConstants.ERR_SVR_SSO_VCODE_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSVRSSOVCodeTimeout); // @"验证码下发超时。"; // @"验证码下发超时。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOVCodeTimeout);
case BaseConstants.ERR_SVR_SSO_NO_IMEI_AND_A2: case BaseConstants.ERR_SVR_SSO_NO_IMEI_AND_A2:
return getLocalizedString(R.string.TUIKitErrorSVRSSONoImeiAndA2); // @"需要带上 IMEI 和 A2 。"; // @"需要带上 IMEI 和 A2 。";
return getLocalizedString(R.string.TUIKitErrorSVRSSONoImeiAndA2);
case BaseConstants.ERR_SVR_SSO_COOKIE_INVALID: case BaseConstants.ERR_SVR_SSO_COOKIE_INVALID:
return getLocalizedString(R.string.TUIKitErrorSVRSSOCookieInvalid); // @"Cookie 非法。"; // @"Cookie 非法。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOCookieInvalid);
case BaseConstants.ERR_SVR_SSO_DOWN_TIP: case BaseConstants.ERR_SVR_SSO_DOWN_TIP:
return getLocalizedString(R.string.TUIKitErrorSVRSSODownTips); // @"下发提示语,D2 过期。"; // @"下发提示语,D2 过期。";
return getLocalizedString(R.string.TUIKitErrorSVRSSODownTips);
case BaseConstants.ERR_SVR_SSO_DISCONNECT: case BaseConstants.ERR_SVR_SSO_DISCONNECT:
return getLocalizedString(R.string.TUIKitErrorSVRSSODisconnect); // @"断链锁屏。"; // @"断链锁屏。";
return getLocalizedString(R.string.TUIKitErrorSVRSSODisconnect);
case BaseConstants.ERR_SVR_SSO_IDENTIFIER_INVALID: case BaseConstants.ERR_SVR_SSO_IDENTIFIER_INVALID:
return getLocalizedString(R.string.TUIKitErrorSVRSSOIdentifierInvalid); // @"失效身份。"; // @"失效身份。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOIdentifierInvalid);
case BaseConstants.ERR_SVR_SSO_CLIENT_CLOSE: case BaseConstants.ERR_SVR_SSO_CLIENT_CLOSE:
return getLocalizedString(R.string.TUIKitErrorSVRSSOClientClose); // @"终端自动退出。"; // @"终端自动退出。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOClientClose);
case BaseConstants.ERR_SVR_SSO_MSFSDK_QUIT: case BaseConstants.ERR_SVR_SSO_MSFSDK_QUIT:
return getLocalizedString(R.string.TUIKitErrorSVRSSOMSFSDKQuit); // @"MSFSDK 自动退出。"; // @"MSFSDK 自动退出。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOMSFSDKQuit);
case BaseConstants.ERR_SVR_SSO_D2KEY_WRONG: case BaseConstants.ERR_SVR_SSO_D2KEY_WRONG:
return getLocalizedString(R.string.TUIKitErrorSVRSSOD2KeyWrong); // @"SSO D2key 解密失败次数太多,通知终端需要重置,重新刷新 D2 。"; // @"SSO D2key 解密失败次数太多,通知终端需要重置,重新刷新 D2 。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOD2KeyWrong);
case BaseConstants.ERR_SVR_SSO_UNSURPPORT: case BaseConstants.ERR_SVR_SSO_UNSURPPORT:
return getLocalizedString(R.string.TUIKitErrorSVRSSOUnsupport); // @"不支持聚合,给终端返回统一的错误码。终端在该 TCP 长连接上停止聚合。"; // @"不支持聚合,给终端返回统一的错误码。终端在该 TCP 长连接上停止聚合。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOUnsupport);
case BaseConstants.ERR_SVR_SSO_PREPAID_ARREARS: case BaseConstants.ERR_SVR_SSO_PREPAID_ARREARS:
return getLocalizedString(R.string.TUIKitErrorSVRSSOPrepaidArrears); // @"预付费欠费。"; // @"预付费欠费。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOPrepaidArrears);
case BaseConstants.ERR_SVR_SSO_PACKET_WRONG: case BaseConstants.ERR_SVR_SSO_PACKET_WRONG:
return getLocalizedString(R.string.TUIKitErrorSVRSSOPacketWrong); // @"请求包格式错误。"; // @"请求包格式错误。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOPacketWrong);
case BaseConstants.ERR_SVR_SSO_APPID_BLACK_LIST: case BaseConstants.ERR_SVR_SSO_APPID_BLACK_LIST:
return getLocalizedString(R.string.TUIKitErrorSVRSSOAppidBlackList); // @"SDKAppID 黑名单。"; // @"SDKAppID 黑名单。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOAppidBlackList);
case BaseConstants.ERR_SVR_SSO_CMD_BLACK_LIST: case BaseConstants.ERR_SVR_SSO_CMD_BLACK_LIST:
return getLocalizedString(R.string.TUIKitErrorSVRSSOCmdBlackList); // @"SDKAppID 设置 service cmd 黑名单。"; // @"SDKAppID 设置 service cmd 黑名单。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOCmdBlackList);
case BaseConstants.ERR_SVR_SSO_APPID_WITHOUT_USING: case BaseConstants.ERR_SVR_SSO_APPID_WITHOUT_USING:
return getLocalizedString(R.string.TUIKitErrorSVRSSOAppidWithoutUsing); // @"SDKAppID 停用。"; // @"SDKAppID 停用。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOAppidWithoutUsing);
case BaseConstants.ERR_SVR_SSO_FREQ_LIMIT: case BaseConstants.ERR_SVR_SSO_FREQ_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSVRSSOFreqLimit); // @"频率限制(用户),频率限制是设置针对某一个协议的每秒请求数的限制。"; // @"频率限制(用户),频率限制是设置针对某一个协议的每秒请求数的限制。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOFreqLimit);
case BaseConstants.ERR_SVR_SSO_OVERLOAD: case BaseConstants.ERR_SVR_SSO_OVERLOAD:
return getLocalizedString(R.string.TUIKitErrorSVRSSOOverload); // @"过载丢包(系统),连接的服务端处理过多请求,处理不过来,拒绝服务。"; // @"过载丢包(系统),连接的服务端处理过多请求,处理不过来,拒绝服务。";
return getLocalizedString(R.string.TUIKitErrorSVRSSOOverload);
// 资源文件错误码 // 资源文件错误码
case BaseConstants.ERR_SVR_RES_NOT_FOUND: case BaseConstants.ERR_SVR_RES_NOT_FOUND:
return getLocalizedString(R.string.TUIKitErrorSVRResNotFound); // @"要发送的资源文件不存在。"; // @"要发送的资源文件不存在。";
return getLocalizedString(R.string.TUIKitErrorSVRResNotFound);
case BaseConstants.ERR_SVR_RES_ACCESS_DENY: case BaseConstants.ERR_SVR_RES_ACCESS_DENY:
return getLocalizedString(R.string.TUIKitErrorSVRResAccessDeny); // @"要发送的资源文件不允许访问。"; // @"要发送的资源文件不允许访问。";
return getLocalizedString(R.string.TUIKitErrorSVRResAccessDeny);
case BaseConstants.ERR_SVR_RES_SIZE_LIMIT: case BaseConstants.ERR_SVR_RES_SIZE_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSVRResSizeLimit); // @"文件大小超过限制。"; // @"文件大小超过限制。";
return getLocalizedString(R.string.TUIKitErrorSVRResSizeLimit);
case BaseConstants.ERR_SVR_RES_SEND_CANCEL: case BaseConstants.ERR_SVR_RES_SEND_CANCEL:
return getLocalizedString(R.string.TUIKitErrorSVRResSendCancel); // @"用户取消发送,如发送过程中登出等原因。"; // @"用户取消发送,如发送过程中登出等原因。";
return getLocalizedString(R.string.TUIKitErrorSVRResSendCancel);
case BaseConstants.ERR_SVR_RES_READ_FAILED: case BaseConstants.ERR_SVR_RES_READ_FAILED:
return getLocalizedString(R.string.TUIKitErrorSVRResReadFailed); // @"读取文件内容失败。"; // @"读取文件内容失败。";
return getLocalizedString(R.string.TUIKitErrorSVRResReadFailed);
case BaseConstants.ERR_SVR_RES_TRANSFER_TIMEOUT: case BaseConstants.ERR_SVR_RES_TRANSFER_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSVRResTransferTimeout); // @"资源文件传输超时"; // @"资源文件传输超时";
return getLocalizedString(R.string.TUIKitErrorSVRResTransferTimeout);
case BaseConstants.ERR_SVR_RES_INVALID_PARAMETERS: case BaseConstants.ERR_SVR_RES_INVALID_PARAMETERS:
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidParameters); // @"参数非法。"; // @"参数非法。";
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidParameters);
case BaseConstants.ERR_SVR_RES_INVALID_FILE_MD5: case BaseConstants.ERR_SVR_RES_INVALID_FILE_MD5:
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidFileMd5); // @"文件 MD5 校验失败。"; // @"文件 MD5 校验失败。";
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidFileMd5);
case BaseConstants.ERR_SVR_RES_INVALID_PART_MD5: case BaseConstants.ERR_SVR_RES_INVALID_PART_MD5:
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidPartMd5); // @"分片 MD5 校验失败。"; // @"分片 MD5 校验失败。";
return getLocalizedString(R.string.TUIKitErrorSVRResInvalidPartMd5);
// 后台公共错误码 // 后台公共错误码
case BaseConstants.ERR_SVR_COMM_INVALID_HTTP_URL: case BaseConstants.ERR_SVR_COMM_INVALID_HTTP_URL:
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidHttpUrl); // @"HTTP 解析错误 ,请检查 HTTP 请求 URL 格式。"; // @"HTTP 解析错误 ,请检查 HTTP 请求 URL 格式。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidHttpUrl);
case BaseConstants.ERR_SVR_COMM_REQ_JSON_PARSE_FAILED: case BaseConstants.ERR_SVR_COMM_REQ_JSON_PARSE_FAILED:
return getLocalizedString(R.string.TUIKitErrorSVRCommomReqJsonParseFailed); // @"HTTP 请求 JSON 解析错误,请检查 JSON 格式。"; // @"HTTP 请求 JSON 解析错误,请检查 JSON 格式。";
return getLocalizedString(R.string.TUIKitErrorSVRCommomReqJsonParseFailed);
case BaseConstants.ERR_SVR_COMM_INVALID_ACCOUNT: case BaseConstants.ERR_SVR_COMM_INVALID_ACCOUNT:
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidAccount); // @"请求 URI 或 JSON 包体中 Identifier 或 UserSig 错误。"; // @"请求 URI 或 JSON 包体中 Identifier 或 UserSig 错误。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidAccount);
case BaseConstants.ERR_SVR_COMM_INVALID_ACCOUNT_EX: case BaseConstants.ERR_SVR_COMM_INVALID_ACCOUNT_EX:
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidAccount); // @"请求 URI 或 JSON 包体中 Identifier 或 UserSig 错误。"; // @"请求 URI 或 JSON 包体中 Identifier 或 UserSig 错误。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidAccount);
case BaseConstants.ERR_SVR_COMM_INVALID_SDKAPPID: case BaseConstants.ERR_SVR_COMM_INVALID_SDKAPPID:
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidSdkappid); // @"SDKAppID 失效,请核对 SDKAppID 有效性。"; // @"SDKAppID 失效,请核对 SDKAppID 有效性。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidSdkappid);
case BaseConstants.ERR_SVR_COMM_REST_FREQ_LIMIT: case BaseConstants.ERR_SVR_COMM_REST_FREQ_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSVRCommonRestFreqLimit); // @"REST 接口调用频率超过限制,请降低请求频率。"; // @"REST 接口调用频率超过限制,请降低请求频率。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonRestFreqLimit);
case BaseConstants.ERR_SVR_COMM_REQUEST_TIMEOUT: case BaseConstants.ERR_SVR_COMM_REQUEST_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorSVRCommonRequestTimeout); // @"服务请求超时或 HTTP 请求格式错误,请检查并重试。"; // @"服务请求超时或 HTTP 请求格式错误,请检查并重试。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonRequestTimeout);
case BaseConstants.ERR_SVR_COMM_INVALID_RES: case BaseConstants.ERR_SVR_COMM_INVALID_RES:
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidRes); // @"请求资源错误,请检查请求 URL。"; // @"请求资源错误,请检查请求 URL。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonInvalidRes);
case BaseConstants.ERR_SVR_COMM_ID_NOT_ADMIN: case BaseConstants.ERR_SVR_COMM_ID_NOT_ADMIN:
return getLocalizedString(R.string.TUIKitErrorSVRCommonIDNotAdmin); // @"REST API 请求的 Identifier 字段请填写 App 管理员帐号。"; // @"REST API 请求的 Identifier 字段请填写 App 管理员帐号。";
return getLocalizedString(R.string.TUIKitErrorSVRCommonIDNotAdmin);
case BaseConstants.ERR_SVR_COMM_SDKAPPID_FREQ_LIMIT: case BaseConstants.ERR_SVR_COMM_SDKAPPID_FREQ_LIMIT:
return getLocalizedString(R.string.TUIKitErrorSVRCommonSdkappidFreqLimit); // @"SDKAppID 请求频率超限,请降低请求频率。"; return getLocalizedString(R.string.TUIKitErrorSVRCommonSdkappidFreqLimit); // @"SDKAppID 请求频率超限,请降低请求频率。";
case BaseConstants.ERR_SVR_COMM_SDKAPPID_MISS: case BaseConstants.ERR_SVR_COMM_SDKAPPID_MISS:
...@@ -586,18 +702,18 @@ public class ErrorMessageConverter { ...@@ -586,18 +702,18 @@ public class ErrorMessageConverter {
return getLocalizedString(R.string.TUIKitErrorTLSSDKNotInitialized); // @"tlssdk未初始化"; return getLocalizedString(R.string.TUIKitErrorTLSSDKNotInitialized); // @"tlssdk未初始化";
case BaseConstants.ERR_TLSSDK_USER_NOT_FOUND: case BaseConstants.ERR_TLSSDK_USER_NOT_FOUND:
return getLocalizedString(R.string.TUIKitErrorTLSSDKUserNotFound); // @"TLSSDK没有找到相应的用户信息"; return getLocalizedString(R.string.TUIKitErrorTLSSDKUserNotFound); // @"TLSSDK没有找到相应的用户信息";
// case BaseConstants.ERR_BIND_FAIL_UNKNOWN: // case BaseConstants.ERR_BIND_FAIL_UNKNOWN:
// return @"QALSDK未知原因BIND失败"; // return @"QALSDK未知原因BIND失败";
// case BaseConstants.ERR_BIND_FAIL_NO_SSOTICKET: // case BaseConstants.ERR_BIND_FAIL_NO_SSOTICKET:
// return @"缺少SSO票据"; // return @"缺少SSO票据";
// case BaseConstants.ERR_BIND_FAIL_REPEATD_BIND: // case BaseConstants.ERR_BIND_FAIL_REPEATD_BIND:
// return @"重复BIND"; // return @"重复BIND";
// case BaseConstants.ERR_BIND_FAIL_TINYID_NULL: // case BaseConstants.ERR_BIND_FAIL_TINYID_NULL:
// return @"tiny为空"; // return @"tiny为空";
// case BaseConstants.ERR_BIND_FAIL_GUID_NULL: // case BaseConstants.ERR_BIND_FAIL_GUID_NULL:
// return @"guid为空"; // return @"guid为空";
// case BaseConstants.ERR_BIND_FAIL_UNPACK_REGPACK_FAILED: // case BaseConstants.ERR_BIND_FAIL_UNPACK_REGPACK_FAILED:
// return @"解注册包失败"; // return @"解注册包失败";
case BaseConstants.ERR_BIND_FAIL_REG_TIMEOUT: case BaseConstants.ERR_BIND_FAIL_REG_TIMEOUT:
return getLocalizedString(R.string.TUIKitErrorBindFaildRegTimeout); // @"注册超时"; return getLocalizedString(R.string.TUIKitErrorBindFaildRegTimeout); // @"注册超时";
case BaseConstants.ERR_BIND_FAIL_ISBINDING: case BaseConstants.ERR_BIND_FAIL_ISBINDING:
...@@ -691,25 +807,33 @@ public class ErrorMessageConverter { ...@@ -691,25 +807,33 @@ public class ErrorMessageConverter {
case BaseConstants.ERR_REQUEST_NO_NET_ONREQ: case BaseConstants.ERR_REQUEST_NO_NET_ONREQ:
return getLocalizedString(R.string.TUIKitErrorRequestNoNetOnReq); // @"请求时没有网络,请等网络恢复后重试"; return getLocalizedString(R.string.TUIKitErrorRequestNoNetOnReq); // @"请求时没有网络,请等网络恢复后重试";
case BaseConstants.ERR_REQUEST_NO_NET_ONRSP: case BaseConstants.ERR_REQUEST_NO_NET_ONRSP:
return getLocalizedString(R.string.TUIKitErrorRequestNoNetOnRsp); // @"响应时没有网络,请等网络恢复后重试"; // @"响应时没有网络,请等网络恢复后重试";
// case BaseConstants.ERR_REQUEST_FAILED: return getLocalizedString(R.string.TUIKitErrorRequestNoNetOnRsp);
// return @"QAL执行失败"; // case BaseConstants.ERR_REQUEST_FAILED:
// case BaseConstants.ERR_REQUEST_INVALID_REQ: // return @"QAL执行失败";
// return @"请求非法,toMsgService非法"; // case BaseConstants.ERR_REQUEST_INVALID_REQ:
// return @"请求非法,toMsgService非法";
case BaseConstants.ERR_REQUEST_OVERLOADED: case BaseConstants.ERR_REQUEST_OVERLOADED:
return getLocalizedString(R.string.TUIKitErrorRequestOnverLoaded); // @"请求队列満"; // @"请求队列満";
return getLocalizedString(R.string.TUIKitErrorRequestOnverLoaded);
case BaseConstants.ERR_REQUEST_KICK_OFF: case BaseConstants.ERR_REQUEST_KICK_OFF:
return getLocalizedString(R.string.TUIKitErrorReqKickOff); // @"已经被其他终端踢了"; // @"已经被其他终端踢了";
return getLocalizedString(R.string.TUIKitErrorReqKickOff);
case BaseConstants.ERR_REQUEST_SERVICE_SUSPEND: case BaseConstants.ERR_REQUEST_SERVICE_SUSPEND:
return getLocalizedString(R.string.TUIKitErrorReqServiceSuspend); // @"服务被暂停"; // @"服务被暂停";
return getLocalizedString(R.string.TUIKitErrorReqServiceSuspend);
case BaseConstants.ERR_REQUEST_INVALID_SIGN: case BaseConstants.ERR_REQUEST_INVALID_SIGN:
return getLocalizedString(R.string.TUIKitErrorReqInvalidSign); // @"SSO签名错误"; // @"SSO签名错误";
return getLocalizedString(R.string.TUIKitErrorReqInvalidSign);
case BaseConstants.ERR_REQUEST_INVALID_COOKIE: case BaseConstants.ERR_REQUEST_INVALID_COOKIE:
return getLocalizedString(R.string.TUIKitErrorReqInvalidCookie); // @"SSO cookie无效"; // @"SSO cookie无效";
return getLocalizedString(R.string.TUIKitErrorReqInvalidCookie);
default: default:
break; break;
} }
} catch (Exception e) {
e.printStackTrace();
}
return msg; return msg;
} }
......
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