Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd1334b8 authored by Andrew Chen's avatar Andrew Chen
Browse files

Add some JavaDoc to SearchAccount stuff; astyle.

parent ef363007
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
/**
 *
 */
package com.fsck.k9;

import java.io.Serializable;
@@ -10,6 +7,10 @@ import android.content.Context;

import com.fsck.k9.mail.Flag;

/**
 * This is a meta-Account that represents one or more accounts with filters on them.  The filter specification
 * is defined by {@link com.fsck.k9.activity.SearchModifier}.
 */
public class SearchAccount implements BaseAccount, SearchSpecification, Serializable {
    private static final long serialVersionUID = -4388420303235543976L;
    private Flag[] mRequiredFlags = null;
@@ -24,17 +25,14 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
    private String[] folderNames = null;

    public SearchAccount(Preferences preferences) {

    }
    protected synchronized void delete(Preferences preferences) {

    protected synchronized void delete(Preferences preferences) {
    }

    public synchronized void save(Preferences preferences) {

    }


    public SearchAccount(Context context, boolean nintegrate, Flag[] requiredFlags, Flag[] forbiddenFlags) {
        mRequiredFlags = requiredFlags;
        mForbiddenFlags = forbiddenFlags;
@@ -78,12 +76,14 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
    public void setQuery(String query) {
        this.query = query;
    }

    public String getUuid() {
        if (mUuid == null) {
            setUuid(UUID.randomUUID().toString());
        }
        return mUuid;
    }

    public void setUuid(String nUuid) {
        mUuid = nUuid;
    }
@@ -99,16 +99,20 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
    public void setBuiltin(boolean builtin) {
        this.builtin = builtin;
    }

    public String[] getAccountUuids() {
        return accountUuids;
    }

    public void setAccountUuids(String[] accountUuids) {
        this.accountUuids = accountUuids;
    }

    @Override
    public String[] getFolderNames() {
        return folderNames;
    }

    public void setFolderNames(String[] folderNames) {
        this.folderNames = folderNames;
    }
+5 −4
Original line number Diff line number Diff line
/**
 *
 */
package com.fsck.k9.activity;

import com.fsck.k9.R;
import com.fsck.k9.mail.Flag;

/**
 * This enum represents filtering parameters used by {@link com.fsck.k9.SearchAccount}.
 */
enum SearchModifier {
    FLAGGED(R.string.flagged_modifier, new Flag[] { Flag.FLAGGED}, null), UNREAD(R.string.unread_modifier, null, new Flag[] { Flag.SEEN});
    FLAGGED(R.string.flagged_modifier, new Flag[]{Flag.FLAGGED}, null),
    UNREAD(R.string.unread_modifier, null, new Flag[]{Flag.SEEN});

    final int resId;
    final Flag[] requiredFlags;