Просмотр исходного кода

合并分支,关闭UU助手功能

Bitliker 8 лет назад
Родитель
Сommit
360f06b2a2
1 измененных файлов с 5 добавлено и 6 удалено
  1. 5 6
      app_core/common/src/main/java/com/core/xmpp/XChatManager.java

+ 5 - 6
app_core/common/src/main/java/com/core/xmpp/XChatManager.java

@@ -5,7 +5,6 @@ import android.util.Log;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
 import com.common.config.VersionUtil;
 import com.common.data.CalendarUtil;
 import com.common.data.JSONUtil;
@@ -146,7 +145,7 @@ public class XChatManager {
             }
             String fromUserId = StringUtils.parseName(message.getFrom());
             String messageBody = message.getBody();
-            if (VersionUtil.showUUHelper() && !StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
+            if (!StringUtils.isEmpty(messageBody) && fromUserId != null && fromUserId.equals("10000")) {
                 saveUUHelperMessage(messageBody);
             } else {
                 saveSingleMessage(message, false);//将消息保存到本地
@@ -284,14 +283,14 @@ public class XChatManager {
 
     /*UU 助手的数据源*/
     private void saveUUHelperMessage(String messageBody) {
-        LogUtil.i("messageBody="+messageBody);
+        if (!VersionUtil.showUUHelper()) return;
         JSONObject object = JSON.parseObject(messageBody);
         long timeSend = JSONUtil.getLong(object, "timeSend");
-        String content = JSONUtil.getText(object, "content","title");
+        String content = JSONUtil.getText(object, "content", "title");
         String imageUrl = JSONUtil.getText(object, "imageUrl");
         String linkUrl = JSONUtil.getText(object, "linkUrl");
         String iconUrl = JSONUtil.getText(object, "iconUrl");
-        String title = JSONUtil.getText(object, "title","content");
+        String title = JSONUtil.getText(object, "title", "content");
         if (timeSend > 0) {
             timeSend *= 1000;
         }
@@ -306,7 +305,7 @@ public class XChatManager {
                 .setLinkUrl(linkUrl)
                 .setImageUrl(imageUrl);
         UUHelperDao.getInstance().saveData(model);
-        NotificationManage.sendUUHelperNotif(content);
+        NotificationManage.sendUUHelperNotif(title);
     }
 
     private void saveMucMessage(String messageBody, String packetId) {