Esempio n. 1
0
 public void setArchiveMode(String account, ArchiveMode archiveMode) {
   AccountItem accountItem = AccountManager.getInstance().getAccount(account);
   AccountManager.getInstance()
       .updateAccount(
           account,
           accountItem.getConnectionSettings().isCustom(),
           accountItem.getConnectionSettings().getHost(),
           accountItem.getConnectionSettings().getPort(),
           accountItem.getConnectionSettings().getServerName(),
           accountItem.getConnectionSettings().getUserName(),
           accountItem.isStorePassword(),
           accountItem.getConnectionSettings().getPassword(),
           accountItem.getConnectionSettings().getResource(),
           accountItem.getPriority(),
           accountItem.isEnabled(),
           accountItem.getConnectionSettings().isSaslEnabled(),
           accountItem.getConnectionSettings().getTlsMode(),
           accountItem.getConnectionSettings().useCompression(),
           accountItem.getConnectionSettings().getProxyType(),
           accountItem.getConnectionSettings().getProxyHost(),
           accountItem.getConnectionSettings().getProxyPort(),
           accountItem.getConnectionSettings().getProxyUser(),
           accountItem.getConnectionSettings().getProxyPassword(),
           accountItem.isSyncable(),
           archiveMode);
 }
Esempio n. 2
0
 /**
  * Sets status for all accounts.
  *
  * @param statusMode
  * @param statusText can be <code>null</code> if value was not changed.
  */
 public void setStatus(StatusMode statusMode, String statusText) {
   SettingsManager.setStatusMode(statusMode);
   if (statusText != null) {
     addSavedStatus(statusMode, statusText);
     SettingsManager.setStatusText(statusText);
   }
   for (AccountItem accountItem : accountItems.values()) {
     setStatus(
         accountItem, statusMode, statusText == null ? accountItem.getStatusText() : statusText);
   }
   resendPresence();
   onAccountsChanged(new ArrayList<String>(AccountManager.getInstance().getAllAccounts()));
 }