private void updateMaxItemsPerSync(String newValue) { updateMaxItems(MAX_ITEMS_PER_SYNC.key, preferences.getMaxItemsPerSync(), newValue); }
private void showDialog(Dialogs.Type dialog) { final Bundle arguments = new Bundle(); switch (dialog) { case FIRST_SYNC: arguments.putInt(MAX_ITEMS_PER_SYNC, preferences.getMaxItemsPerSync()); break; case MISSING_CREDENTIALS: arguments.putBoolean(USE_XOAUTH, authPreferences.useXOAuth()); break; case WEB_CONNECT: arguments.putParcelable(WebConnect.INTENT, fallbackAuthIntent); break; case SMS_DEFAULT_PACKAGE_CHANGE: arguments.putParcelable(SmsDefaultPackage.INTENT, changeDefaultPackageIntent); break; } showDialog(dialog, arguments); }
private void finishedBackup(BackupState state) { int backedUpCount = state.currentSyncedItems; String text = null; if (backedUpCount == preferences.getMaxItemsPerSync()) { text = getString(R.string.status_backup_done_details_max_per_sync, backedUpCount); } else if (backedUpCount > 0) { text = getQuantityString(R.plurals.status_backup_done_details, backedUpCount, backedUpCount); } else if (backedUpCount == 0) { text = getString(R.string.status_backup_done_details_noitems); } syncDetailsLabel.setText(text); statusLabel.setText(R.string.status_done); statusLabel.setTextColor(doneColor); statusIcon.setImageDrawable(done); }
private BackupConfig getBackupConfig(BackupType backupType, EnumSet<DataType> enabledTypes, BackupImapStore imapStore) { return new BackupConfig( imapStore, 0, getPreferences().getMaxItemsPerSync(), getPreferences().getBackupContactGroup(), backupType, enabledTypes, getPreferences().isAppLogDebug() ); }