mirror of
https://github.com/moparisthebest/k-9
synced 2024-08-13 17:03:48 -04:00
Fix compiler warnings/code style
This commit is contained in:
parent
0844b4d394
commit
bfdee8161c
@ -110,12 +110,9 @@ public class Account implements BaseAccount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getToast(boolean ascending) {
|
public int getToast(boolean ascending) {
|
||||||
if (ascending) {
|
return (ascending) ? ascendingToast : descendingToast;
|
||||||
return ascendingToast;
|
|
||||||
} else {
|
|
||||||
return descendingToast;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDefaultAscending() {
|
public boolean isDefaultAscending() {
|
||||||
return defaultAscending;
|
return defaultAscending;
|
||||||
}
|
}
|
||||||
@ -837,44 +834,44 @@ public class Account implements BaseAccount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ColorChip generateColorChip(boolean messageRead, boolean toMe, boolean ccMe, boolean fromMe, boolean messageFlagged) {
|
public ColorChip generateColorChip(boolean messageRead, boolean toMe, boolean ccMe,
|
||||||
|
boolean fromMe, boolean messageFlagged) {
|
||||||
|
ColorChip chip;
|
||||||
|
|
||||||
if (messageRead) {
|
if (messageRead) {
|
||||||
if (messageFlagged) {
|
if (messageFlagged) {
|
||||||
return mFlaggedReadColorChip;
|
chip = mFlaggedReadColorChip;
|
||||||
} else if (toMe) {
|
} else if (toMe) {
|
||||||
return mToMeReadColorChip;
|
chip = mToMeReadColorChip;
|
||||||
} else if (ccMe) {
|
} else if (ccMe) {
|
||||||
return mCcMeReadColorChip;
|
chip = mCcMeReadColorChip;
|
||||||
} else if (fromMe) {
|
} else if (fromMe) {
|
||||||
return mFromMeReadColorChip;
|
chip = mFromMeReadColorChip;
|
||||||
} else {
|
} else {
|
||||||
return mReadColorChip;
|
chip = mReadColorChip;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (messageFlagged) {
|
if (messageFlagged) {
|
||||||
return mFlaggedUnreadColorChip;
|
chip = mFlaggedUnreadColorChip;
|
||||||
} else if (toMe) {
|
} else if (toMe) {
|
||||||
return mToMeUnreadColorChip;
|
chip = mToMeUnreadColorChip;
|
||||||
} else if (ccMe) {
|
} else if (ccMe) {
|
||||||
return mCcMeUnreadColorChip;
|
chip = mCcMeUnreadColorChip;
|
||||||
} else if (fromMe) {
|
} else if (fromMe) {
|
||||||
return mFromMeUnreadColorChip;
|
chip = mFromMeUnreadColorChip;
|
||||||
} else {
|
} else {
|
||||||
return mUnreadColorChip;
|
chip = mUnreadColorChip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return chip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ColorChip generateColorChip() {
|
public ColorChip generateColorChip() {
|
||||||
return new ColorChip(mChipColor, false, ColorChip.CIRCULAR);
|
return new ColorChip(mChipColor, false, ColorChip.CIRCULAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getUuid() {
|
public String getUuid() {
|
||||||
return mUuid;
|
return mUuid;
|
||||||
}
|
}
|
||||||
@ -899,10 +896,12 @@ public class Account implements BaseAccount {
|
|||||||
this.mTransportUri = transportUri;
|
this.mTransportUri = transportUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public synchronized String getDescription() {
|
public synchronized String getDescription() {
|
||||||
return mDescription;
|
return mDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public synchronized void setDescription(String description) {
|
public synchronized void setDescription(String description) {
|
||||||
this.mDescription = description;
|
this.mDescription = description;
|
||||||
}
|
}
|
||||||
@ -931,10 +930,12 @@ public class Account implements BaseAccount {
|
|||||||
identities.get(0).setSignature(signature);
|
identities.get(0).setSignature(signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public synchronized String getEmail() {
|
public synchronized String getEmail() {
|
||||||
return identities.get(0).getEmail();
|
return identities.get(0).getEmail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public synchronized void setEmail(String email) {
|
public synchronized void setEmail(String email) {
|
||||||
identities.get(0).setEmail(email);
|
identities.get(0).setEmail(email);
|
||||||
}
|
}
|
||||||
@ -983,11 +984,6 @@ public class Account implements BaseAccount {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// public synchronized void setLocalStoreUri(String localStoreUri)
|
|
||||||
// {
|
|
||||||
// this.mLocalStoreUri = localStoreUri;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns -1 for never.
|
* Returns -1 for never.
|
||||||
*/
|
*/
|
||||||
@ -1050,25 +1046,17 @@ public class Account implements BaseAccount {
|
|||||||
this.mDeletePolicy = deletePolicy;
|
this.mDeletePolicy = deletePolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isSpecialFolder(String folderName) {
|
public boolean isSpecialFolder(String folderName) {
|
||||||
if (folderName != null && (folderName.equalsIgnoreCase(getInboxFolderName()) ||
|
return (folderName != null && (folderName.equalsIgnoreCase(getInboxFolderName()) ||
|
||||||
folderName.equals(getTrashFolderName()) ||
|
folderName.equals(getTrashFolderName()) ||
|
||||||
folderName.equals(getDraftsFolderName()) ||
|
folderName.equals(getDraftsFolderName()) ||
|
||||||
folderName.equals(getArchiveFolderName()) ||
|
folderName.equals(getArchiveFolderName()) ||
|
||||||
folderName.equals(getSpamFolderName()) ||
|
folderName.equals(getSpamFolderName()) ||
|
||||||
folderName.equals(getOutboxFolderName()) ||
|
folderName.equals(getOutboxFolderName()) ||
|
||||||
folderName.equals(getSentFolderName()) ||
|
folderName.equals(getSentFolderName()) ||
|
||||||
folderName.equals(getErrorFolderName()))) {
|
folderName.equals(getErrorFolderName())));
|
||||||
return true;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized String getDraftsFolderName() {
|
public synchronized String getDraftsFolderName() {
|
||||||
return mDraftsFolderName;
|
return mDraftsFolderName;
|
||||||
}
|
}
|
||||||
@ -1297,11 +1285,7 @@ public class Account implements BaseAccount {
|
|||||||
// to get this, but that's expensive and not easily accessible
|
// to get this, but that's expensive and not easily accessible
|
||||||
// during initialization
|
// during initialization
|
||||||
public boolean isSearchByDateCapable() {
|
public boolean isSearchByDateCapable() {
|
||||||
if (getStoreUri().startsWith("imap")) {
|
return (getStoreUri().startsWith("imap"));
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1318,9 +1302,9 @@ public class Account implements BaseAccount {
|
|||||||
Boolean useCompression = compressionMap.get(networkType);
|
Boolean useCompression = compressionMap.get(networkType);
|
||||||
if (useCompression == null) {
|
if (useCompression == null) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return useCompression;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return useCompression;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean useCompression(int type) {
|
public boolean useCompression(int type) {
|
||||||
@ -1577,9 +1561,9 @@ public class Account implements BaseAccount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return now.getTime();
|
return now.getTime();
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MessageFormat getMessageFormat() {
|
public MessageFormat getMessageFormat() {
|
||||||
|
Loading…
Reference in New Issue
Block a user