diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index c9d01ec8c..88f66388d 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -1,5 +1,6 @@ package com.yunbao.common.http; +import android.app.Dialog; import android.content.Context; import android.os.Build; import android.util.Log; @@ -21,6 +22,8 @@ import com.yunbao.common.manager.APKManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.LiveClassManager; import com.yunbao.common.manager.NewLevelManager; +import com.yunbao.common.utils.AppManager; +import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.L; import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.SpUtil; @@ -224,7 +227,8 @@ public class CommonHttpUtil { } if (obj.containsKey("clarity")) { IMLoginManager.get(context).setClarity(obj.getString("clarity")); - } if (obj.containsKey("defaultBubbleUrl")) { + } + if (obj.containsKey("defaultBubbleUrl")) { IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl")); } } catch (Exception e) { @@ -232,6 +236,22 @@ public class CommonHttpUtil { String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage(); ErrorActivity.forward("GetConfig接口返回数据异常", error); } + } else if (code == 1000) { + new DialogUitl + .Builder(context) + .setContent(msg) + .setCancelable(false) + .setClickCallback3(new DialogUitl.SimpleCallback3() { + @Override + public void onConfirmClick(Dialog dialog) { + AppManager.getInstance().AppExit(); + } + + @Override + public void onCancel() { + AppManager.getInstance().AppExit(); + } + }).build().show(); } }