1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-02-11 20:50:19 -05:00

find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs

This commit is contained in:
Jesse Vincent 2010-10-05 06:04:28 +00:00
parent 58bb54a588
commit 6061c42ea9
20 changed files with 120 additions and 103 deletions

View File

@ -695,11 +695,13 @@ public class K9 extends Application
mChangeRegisteredNameColor = checkboxes;
}
public static int getRegisteredNameColor() {
public static int getRegisteredNameColor()
{
return mRegisteredNameColor;
}
public static void setRegisteredNameColor(int registeredNameColor) {
public static void setRegisteredNameColor(int registeredNameColor)
{
mRegisteredNameColor = registeredNameColor;
}

View File

@ -1874,14 +1874,16 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
if (quotedText == null)
{
part = MimeUtility.findFirstPartByMimeType(message, "text/plain");
if (part != null) {
if (part != null)
{
quotedText = MimeUtility.getTextFromPart(part);
}
}
if (quotedText == null)
{
part = MimeUtility.findFirstPartByMimeType(message, "text/html");
if (part != null) {
if (part != null)
{
quotedText = (Html.fromHtml(MimeUtility.getTextFromPart(part))).toString();
}
}
@ -1897,7 +1899,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mSourceMessage.getRecipients(RecipientType.TO)),
Address.toString(
mSourceMessage.getRecipients(RecipientType.CC)));
if (quotedText != null) {
if (quotedText != null)
{
quotedText = quotedText.replaceAll("\\\r", "");
mQuotedText.setText(text);

View File

@ -318,7 +318,8 @@ public class MessageList
private Context context = null;
/* package visibility for faster inner class access */ MessageHelper mMessageHelper = MessageHelper.getInstance(this);
/* package visibility for faster inner class access */
MessageHelper mMessageHelper = MessageHelper.getInstance(this);
class MessageListHandler
{

View File

@ -243,11 +243,13 @@ public class Prefs extends K9PreferenceActivity
{
public boolean onPreferenceChange(Preference preference, Object newValue)
{
if ((boolean)(Boolean)newValue == true) {
if ((boolean)(Boolean)newValue == true)
{
onChooseRegisteredNameColor();
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_changed);
}
else {
else
{
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_default);
}
mChangeRegisteredNameColor.setChecked((Boolean)newValue);

View File

@ -38,7 +38,8 @@ public class Address
private static final Address[] EMPTY_ADDRESS_ARRAY = new Address[0];
private static Map<String,String> sContactsName = new ConcurrentHashMap<String, String>();
public static void clearContactsNameCache() {
public static void clearContactsNameCache()
{
sContactsName.clear();
}
@ -263,7 +264,8 @@ public class Address
if (name != null && name != NO_ENTRY)
{
if (K9.changeRegisteredNameColor()) {
if (K9.changeRegisteredNameColor())
{
SpannableString sname = new SpannableString(name);
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
0,
@ -272,7 +274,8 @@ public class Address
);
return sname;
}
else {
else
{
return name;
}
}
@ -287,10 +290,12 @@ public class Address
{
cursor.moveToFirst();
name = contacts.getName(cursor); // name might return null
if (name != null) {
if (name != null)
{
sContactsName.put(mAddress, name);
if (K9.changeRegisteredNameColor()) {
if (K9.changeRegisteredNameColor())
{
SpannableString sname = new SpannableString(name);
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
0,
@ -299,7 +304,8 @@ public class Address
);
return sname;
}
else {
else
{
return name;
}
}

View File

@ -388,7 +388,8 @@ public class MimeUtility
String extension = filename.substring(filename.lastIndexOf('.')+1).toLowerCase();
returnedType = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
}
if (returnedType != null) {
if (returnedType != null)
{
return returnedType;
}
else

View File

@ -180,7 +180,8 @@ public class LocalStore extends Store implements Serializable
+ "DELETE FROM headers where old.id = message_id; END;");
}
else
{ // in the case that we're starting out at 29 or newer, run all the needed updates
{
// in the case that we're starting out at 29 or newer, run all the needed updates
if (mDb.getVersion() < 30)
{

View File

@ -119,7 +119,8 @@ public class MessageProvider extends ContentProvider
holder.uri,
CONTENT_URI + "/delete_message/"
+ message.getFolder().getAccount().getAccountNumber() + "/"
+ message.getFolder().getName() + "/" + message.getUid() });
+ message.getFolder().getName() + "/" + message.getUid()
});
}
return cursor;
}