コード例 #1
0
ファイル: SyncThread.java プロジェクト: tchukuchuk/rhodes
 public static void doSyncSourceByName(String strSrcName, boolean bShowStatus) {
   if (bShowStatus && (m_statusListener != null)) {
     m_statusListener.createStatusPopup(RhoAppAdapter.getMessageText("syncronizing_data"));
   }
   getInstance()
       .addQueueCommand(new SyncCommand(SyncThread.scSyncOne, strSrcName, (int) 0, bShowStatus));
 }
コード例 #2
0
ファイル: SyncNotify.java プロジェクト: LittleForker/rhodes
  public void reportSyncStatus(String status, int error, String strDetails) {
    synchronized (m_mxSyncNotifications) {
      if (m_syncStatusListener != null
          && (isReportingEnabled() || error == RhoAppAdapter.ERR_SYNCVERSION)) {

        if (error == RhoAppAdapter.ERR_SYNCVERSION) status = RhoAppAdapter.getErrorText(error);
        else {
          if (strDetails.length() == 0) strDetails = RhoAppAdapter.getErrorText(error);
          status +=
              (strDetails.length() > 0 ? RhoAppAdapter.getMessageText("details") + strDetails : "");
        }

        LOG.INFO("Status: " + status);

        m_syncStatusListener.reportStatus(status, error);
      }
    }
  }