1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-02 14:02:17 -05:00

ant astyle

This commit is contained in:
Jesse Vincent 2011-06-01 16:03:56 -04:00
parent 0c2e06133c
commit 3d583da450
12 changed files with 156 additions and 161 deletions

View File

@ -34,7 +34,7 @@ public class ActivityListener extends MessagingListener {
if (mLoadingFolderName != null || mLoadingHeaderFolderName != null) { if (mLoadingFolderName != null || mLoadingHeaderFolderName != null) {
String displayName = mLoadingFolderName; String displayName = mLoadingFolderName;
if ((mAccount != null) && (mAccount.getInboxFolderName()!= null) && mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) { if ((mAccount != null) && (mAccount.getInboxFolderName() != null) && mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) {
displayName = context.getString(R.string.special_mailbox_name_inbox); displayName = context.getString(R.string.special_mailbox_name_inbox);
} else if ((mAccount != null) && mAccount.getOutboxFolderName().equals(displayName)) { } else if ((mAccount != null) && mAccount.getOutboxFolderName().equals(displayName)) {
displayName = context.getString(R.string.special_mailbox_name_outbox); displayName = context.getString(R.string.special_mailbox_name_outbox);

View File

@ -1713,22 +1713,19 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mQuotedText.setVisibility(View.GONE); mQuotedText.setVisibility(View.GONE);
mQuotedHTML.setVisibility(View.GONE); mQuotedHTML.setVisibility(View.GONE);
mQuotedTextEdit.setVisibility(View.GONE); mQuotedTextEdit.setVisibility(View.GONE);
} } else if (mQuotedTextMode == QuotedTextMode.SHOW) {
else if (mQuotedTextMode == QuotedTextMode.SHOW) {
mQuotedTextShow.setVisibility(View.GONE); mQuotedTextShow.setVisibility(View.GONE);
mQuotedTextBar.setVisibility(View.VISIBLE); mQuotedTextBar.setVisibility(View.VISIBLE);
if (mMessageFormat == MessageFormat.HTML){ if (mMessageFormat == MessageFormat.HTML) {
mQuotedText.setVisibility(View.GONE); mQuotedText.setVisibility(View.GONE);
mQuotedHTML.setVisibility(View.VISIBLE); mQuotedHTML.setVisibility(View.VISIBLE);
mQuotedTextEdit.setVisibility(View.VISIBLE); mQuotedTextEdit.setVisibility(View.VISIBLE);
} } else {
else {
mQuotedText.setVisibility(View.VISIBLE); mQuotedText.setVisibility(View.VISIBLE);
mQuotedHTML.setVisibility(View.GONE); mQuotedHTML.setVisibility(View.GONE);
mQuotedTextEdit.setVisibility(View.GONE); mQuotedTextEdit.setVisibility(View.GONE);
} }
} } else if (mQuotedTextMode == QuotedTextMode.HIDE) {
else if (mQuotedTextMode == QuotedTextMode.HIDE) {
mQuotedTextShow.setVisibility(View.VISIBLE); mQuotedTextShow.setVisibility(View.VISIBLE);
mQuotedTextBar.setVisibility(View.GONE); mQuotedTextBar.setVisibility(View.GONE);
@ -2106,10 +2103,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
} }
int cursorPosition = 0; int cursorPosition = 0;
if(k9identity.containsKey(IdentityField.CURSOR_POSITION)) { if (k9identity.containsKey(IdentityField.CURSOR_POSITION)) {
try { try {
cursorPosition = Integer.valueOf(k9identity.get(IdentityField.CURSOR_POSITION)).intValue(); cursorPosition = Integer.valueOf(k9identity.get(IdentityField.CURSOR_POSITION)).intValue();
} catch(Exception e) { } catch (Exception e) {
Log.e(K9.LOG_TAG, "Could not parse cursor position for MessageCompose; continuing.", e); Log.e(K9.LOG_TAG, "Could not parse cursor position for MessageCompose; continuing.", e);
} }
} }
@ -2193,7 +2190,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
// Set the cursor position if we have it. // Set the cursor position if we have it.
try { try {
mMessageContentView.setSelection(cursorPosition); mMessageContentView.setSelection(cursorPosition);
} catch(Exception e) { } catch (Exception e) {
Log.e(K9.LOG_TAG, "Could not set cursor position in MessageCompose; ignoring.", e); Log.e(K9.LOG_TAG, "Could not set cursor position in MessageCompose; ignoring.", e);
} }
@ -2205,8 +2202,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
* the source message. Log it as an error, though. * the source message. Log it as an error, though.
*/ */
Log.e(K9.LOG_TAG, "Error while processing source message: ", me); Log.e(K9.LOG_TAG, "Error while processing source message: ", me);
} } finally {
finally {
mSourceMessageProcessed = true; mSourceMessageProcessed = true;
mDraftNeedsSaving = false; mDraftNeedsSaving = false;
} }
@ -2236,8 +2232,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
if (shown) { if (shown) {
showOrHideQuotedText(QuotedTextMode.SHOW); showOrHideQuotedText(QuotedTextMode.SHOW);
} } else {
else {
showOrHideQuotedText(QuotedTextMode.HIDE); showOrHideQuotedText(QuotedTextMode.HIDE);
} }
} }

View File

@ -261,7 +261,7 @@ public class AccountSetupCheckSettings extends K9Activity implements OnClickList
// by a subjectDN not matching the server even though a // by a subjectDN not matching the server even though a
// SubjectAltName matches) // SubjectAltName matches)
try { try {
final Collection<List<?>> subjectAlternativeNames = chain[i].getSubjectAlternativeNames(); final Collection < List<? >> subjectAlternativeNames = chain[i].getSubjectAlternativeNames();
if (subjectAlternativeNames != null) { if (subjectAlternativeNames != null) {
// The list of SubjectAltNames may be very long // The list of SubjectAltNames may be very long
//TODO: localize this string //TODO: localize this string

View File

@ -19,11 +19,12 @@ public class FileBrowserHelper {
* A string array that specifies the name of the intent to use, and the scheme to use with it * A string array that specifies the name of the intent to use, and the scheme to use with it
* when setting the data for the intent. * when setting the data for the intent.
*/ */
private static final String[][] PICK_DIRECTORY_INTENTS = private static final String[][] PICK_DIRECTORY_INTENTS = {
{ { "org.openintents.action.PICK_DIRECTORY", "file://" }, // OI File Manager (maybe others) { "org.openintents.action.PICK_DIRECTORY", "file://" }, // OI File Manager (maybe others)
{ "com.estrongs.action.PICK_DIRECTORY", "file://" }, // ES File Explorer { "com.estrongs.action.PICK_DIRECTORY", "file://" }, // ES File Explorer
{ Intent.ACTION_PICK, "folder://" }, // Blackmoon File Browser (maybe others) { Intent.ACTION_PICK, "folder://" }, // Blackmoon File Browser (maybe others)
{ "com.androidworkz.action.PICK_DIRECTORY", "file://" }}; // SystemExplorer { "com.androidworkz.action.PICK_DIRECTORY", "file://" }
}; // SystemExplorer
private static FileBrowserHelper sInstance; private static FileBrowserHelper sInstance;

View File

@ -275,7 +275,7 @@ public class SmtpTransport extends Transport {
} }
try { try {
saslAuthPlain(mUsername, mPassword); saslAuthPlain(mUsername, mPassword);
} catch(MessagingException ex) { } catch (MessagingException ex) {
// PLAIN is a special case. Historically, PLAIN has represented both PLAIN and LOGIN; only the // PLAIN is a special case. Historically, PLAIN has represented both PLAIN and LOGIN; only the
// protocol being advertised by the server would be used, with PLAIN taking precedence. Instead // protocol being advertised by the server would be used, with PLAIN taking precedence. Instead
// of using only the requested protocol, we'll try PLAIN and then try LOGIN. // of using only the requested protocol, we'll try PLAIN and then try LOGIN.
@ -397,7 +397,7 @@ public class SmtpTransport extends Transport {
String msg = e.getMessage(); String msg = e.getMessage();
if (msg != null && msg.startsWith("5")) { if (msg != null && msg.startsWith("5")) {
Log.w(K9.LOG_TAG, "handling 5xx SMTP error code as a permanent failure"); Log.w(K9.LOG_TAG, "handling 5xx SMTP error code as a permanent failure");
possibleSend=false; possibleSend = false;
} }
me.setPermanentFailure(possibleSend); me.setPermanentFailure(possibleSend);

View File

@ -78,8 +78,7 @@ public class TimePickerPreference extends DialogPreference implements
tp.setOnTimeChangedListener(this); tp.setOnTimeChangedListener(this);
originalHour = getHour(); originalHour = getHour();
originalMinute = getMinute(); originalMinute = getMinute();
if (originalHour >= 0 && originalMinute >= 0) if (originalHour >= 0 && originalMinute >= 0) {
{
tp.setCurrentHour(originalHour); tp.setCurrentHour(originalHour);
tp.setCurrentMinute(originalMinute); tp.setCurrentMinute(originalMinute);
} }