修改,中英文问题(默认加载系统语言)
This commit is contained in:
parent
abe71808fb
commit
097528f97a
@ -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");
|
||||
|
@ -26,55 +26,5 @@ ext {
|
||||
isGooglePlay : true,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
}
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user