private boolean checkForFolderSetting(final ArrayList<ImmutableTriple<PersistableFolder, String, String>> currentFolderValues, final ArrayList<ImmutablePair<PersistableFolder, String>> unsetFolders, final String key, final String value) {
        // check if persistable folder settings differ
        for (int i = 0; i < currentFolderValues.size(); i++) {
            final ImmutableTriple<PersistableFolder, String, String> current = currentFolderValues.get(i);
            if (current.middle.equals(key)) {
                if (!current.right.equals(value)) {
                    currentFolderValues.add(new ImmutableTriple<>(current.left, current.middle, value));
                }
                currentFolderValues.remove(i);
                return true;
            }
        }

        // check if this is a folder grant setting for a folder currently not set
        for (int i = 0; i < unsetFolders.size(); i++) {
            final ImmutablePair<PersistableFolder, String> current = unsetFolders.get(i);
            if (current.right.equals(key)) {
                currentFolderValues.add(new ImmutableTriple<>(current.left, current.right, value));
                unsetFolders.remove(i);
                return true;
            }
        }

        // no folder-related setting found
        return false;
    }
Private methods containing the real backup process
main/src/main/java/cgeo/geocaching/utils/BackupUtils.java