From 097528f97aa62f222b3c4007f5e3d81fd785a756 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 24 Apr 2023 17:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E9=97=AE=E9=A2=98=EF=BC=88=E9=BB=98=E8=AE=A4=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E7=B3=BB=E7=BB=9F=E8=AF=AD=E8=A8=80=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/manager/IMLoginManager.java | 7 ++- config.gradle | 50 ------------------- .../presenter/LiveRoomCheckLivePresenter.java | 10 ++-- 3 files changed, 11 insertions(+), 56 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 6fcdf9af1..0b00dabcf 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -55,7 +55,12 @@ public class IMLoginManager extends BaseCacheManager { } public Locale getLocaleLanguage() { - if (!getBoolean(KEY_LANGUAGE, false)) { + Locale locale = context.getResources().getConfiguration().locale; + String language = locale.getLanguage(); + if (language.contains("HK") || language.contains("hk") || language.contains("TW") || language.contains("tw")) { + language = "zh"; + } + if (!getBoolean(KEY_LANGUAGE, !TextUtils.equals(language, "zh"))) { return Locale.SIMPLIFIED_CHINESE; } else { return new Locale("en", "rUS"); diff --git a/config.gradle b/config.gradle index b6984158a..367862767 100644 --- a/config.gradle +++ b/config.gradle @@ -26,55 +26,5 @@ ext { isGooglePlay : true, //是否上报异常日志 isUploadLog : true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ] } \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java index ce2690916..260d1707b 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java @@ -19,7 +19,6 @@ import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.ToastUtil; -import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.http.LiveHttpConsts; @@ -49,6 +48,7 @@ public class LiveRoomCheckLivePresenter { * @param stream */ public LiveRoomCheckLivePresenter(Context context, String liveUid, String stream, NewActionListener actionListener) { + mContext = context; LiveNetManager.get(context) .checkLive(liveUid, stream, new CheckLiveCallBack() { @Override @@ -60,7 +60,7 @@ public class LiveRoomCheckLivePresenter { @Override public void forwardPwdRoom(CheckLiveModel model) { - DialogUitl.showSimpleInputDialog(context,mContext.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() { + DialogUitl.showSimpleInputDialog(context, context.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() { @Override public void onCancelClick() { if (mContext instanceof Activity) { @@ -110,7 +110,7 @@ public class LiveRoomCheckLivePresenter { @Override public void onError(String error) { - Log.e("直播间异常", "onError: "+error ); + Log.e("直播间异常", "onError: " + error); Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION)); ToastUtil.show(error); @@ -161,7 +161,7 @@ public class LiveRoomCheckLivePresenter { } } } else { - Log.e("直播间异常", "Error: "+msg ); + Log.e("直播间异常", "Error: " + msg); Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION)); ToastUtil.show(msg); @@ -190,7 +190,7 @@ public class LiveRoomCheckLivePresenter { * 前往密码房间 */ private void forwardPwdRoom() { - DialogUitl.showSimpleInputDialog(mContext,mContext.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() { + DialogUitl.showSimpleInputDialog(mContext, mContext.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback2() { @Override public void onCancelClick() { if (mContext instanceof Activity) {