コード例 #1
0
 public void download() {
   if (curStatus == STATUS_UM) {
     UmFunc.getIns().downloadFile(message, resource);
   } else if (curStatus == STATUS_GROUP_ZONE) {
     GroupZoneFunc.ins().downloadFile(groupFile);
   } else if (curStatus == STATUS_PREVIEW) {
     // do nothing
     Logger.error(LocalLog.APPTAG, "local file, don't download.");
   }
 }
コード例 #2
0
 public void cancelTransfer() {
   if (curStatus == STATUS_UM) {
     AutoCancelStack.getIns().cancelAuto(message.getMessageId());
     UmFunc.getIns().cancelTransFile(message.getId(), resource.getMediaId(), false);
   } else if (curStatus == STATUS_GROUP_ZONE) {
     GroupZoneFunc.ins().cancelDownload(groupFile);
   } else if (curStatus == STATUS_PREVIEW) {
     // do nothing
     Logger.error(LocalLog.APPTAG, "local file, don't download.");
   }
 }
コード例 #3
0
    @Override
    public void run() {
      try {
        // 延迟1.5s处理,如果还不存在公众号,
        // 则不处理这个公众号的消息
        Thread.sleep(1500);
      } catch (InterruptedException e) {
        Logger.error(EspaceService.TAG, e);
      }

      handleMsgLists(msgLists, null);
    }
コード例 #4
0
  public void updateByGroupId(int imId, int groupId) {
    if (imId <= 0 || groupId <= 0) {
      Logger.error(EspaceService.TAG, "id is 0, not update.");
      return;
    }

    String[] objs = new String[] {String.valueOf(imId), String.valueOf(groupId)};

    StringBuffer buffer = new StringBuffer("update ");
    buffer.append(TABLE_NAME);
    buffer.append(" set ");
    buffer.append(INSTANTMESSAGEID);
    buffer.append(" = ? ");
    buffer.append(" where ");
    buffer.append(GROUPFILEID);
    buffer.append(" = ?");

    execSql(buffer.toString(), objs);
  }