mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-04 08:35:08 -05:00
Add some JavaDoc to SearchAccount stuff; astyle.
This commit is contained in:
parent
ef36300739
commit
dd1334b874
@ -1,6 +1,3 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.fsck.k9;
|
package com.fsck.k9;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -10,6 +7,10 @@ import android.content.Context;
|
|||||||
|
|
||||||
import com.fsck.k9.mail.Flag;
|
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 {
|
public class SearchAccount implements BaseAccount, SearchSpecification, Serializable {
|
||||||
private static final long serialVersionUID = -4388420303235543976L;
|
private static final long serialVersionUID = -4388420303235543976L;
|
||||||
private Flag[] mRequiredFlags = null;
|
private Flag[] mRequiredFlags = null;
|
||||||
@ -24,17 +25,14 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
|
|||||||
private String[] folderNames = null;
|
private String[] folderNames = null;
|
||||||
|
|
||||||
public SearchAccount(Preferences preferences) {
|
public SearchAccount(Preferences preferences) {
|
||||||
|
|
||||||
}
|
}
|
||||||
protected synchronized void delete(Preferences preferences) {
|
|
||||||
|
|
||||||
|
protected synchronized void delete(Preferences preferences) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void save(Preferences preferences) {
|
public synchronized void save(Preferences preferences) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public SearchAccount(Context context, boolean nintegrate, Flag[] requiredFlags, Flag[] forbiddenFlags) {
|
public SearchAccount(Context context, boolean nintegrate, Flag[] requiredFlags, Flag[] forbiddenFlags) {
|
||||||
mRequiredFlags = requiredFlags;
|
mRequiredFlags = requiredFlags;
|
||||||
mForbiddenFlags = forbiddenFlags;
|
mForbiddenFlags = forbiddenFlags;
|
||||||
@ -78,12 +76,14 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
|
|||||||
public void setQuery(String query) {
|
public void setQuery(String query) {
|
||||||
this.query = query;
|
this.query = query;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUuid() {
|
public String getUuid() {
|
||||||
if (mUuid == null) {
|
if (mUuid == null) {
|
||||||
setUuid(UUID.randomUUID().toString());
|
setUuid(UUID.randomUUID().toString());
|
||||||
}
|
}
|
||||||
return mUuid;
|
return mUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUuid(String nUuid) {
|
public void setUuid(String nUuid) {
|
||||||
mUuid = nUuid;
|
mUuid = nUuid;
|
||||||
}
|
}
|
||||||
@ -99,16 +99,20 @@ public class SearchAccount implements BaseAccount, SearchSpecification, Serializ
|
|||||||
public void setBuiltin(boolean builtin) {
|
public void setBuiltin(boolean builtin) {
|
||||||
this.builtin = builtin;
|
this.builtin = builtin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getAccountUuids() {
|
public String[] getAccountUuids() {
|
||||||
return accountUuids;
|
return accountUuids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAccountUuids(String[] accountUuids) {
|
public void setAccountUuids(String[] accountUuids) {
|
||||||
this.accountUuids = accountUuids;
|
this.accountUuids = accountUuids;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getFolderNames() {
|
public String[] getFolderNames() {
|
||||||
return folderNames;
|
return folderNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFolderNames(String[] folderNames) {
|
public void setFolderNames(String[] folderNames) {
|
||||||
this.folderNames = folderNames;
|
this.folderNames = folderNames;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.fsck.k9.activity;
|
package com.fsck.k9.activity;
|
||||||
|
|
||||||
import com.fsck.k9.R;
|
import com.fsck.k9.R;
|
||||||
import com.fsck.k9.mail.Flag;
|
import com.fsck.k9.mail.Flag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This enum represents filtering parameters used by {@link com.fsck.k9.SearchAccount}.
|
||||||
|
*/
|
||||||
enum SearchModifier {
|
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 int resId;
|
||||||
final Flag[] requiredFlags;
|
final Flag[] requiredFlags;
|
||||||
|
Loading…
Reference in New Issue
Block a user