mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-14 22:20:12 -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:
parent
58bb54a588
commit
6061c42ea9
@ -695,11 +695,13 @@ public class K9 extends Application
|
|||||||
mChangeRegisteredNameColor = checkboxes;
|
mChangeRegisteredNameColor = checkboxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getRegisteredNameColor() {
|
public static int getRegisteredNameColor()
|
||||||
|
{
|
||||||
return mRegisteredNameColor;
|
return mRegisteredNameColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setRegisteredNameColor(int registeredNameColor) {
|
public static void setRegisteredNameColor(int registeredNameColor)
|
||||||
|
{
|
||||||
mRegisteredNameColor = registeredNameColor;
|
mRegisteredNameColor = registeredNameColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1874,14 +1874,16 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
if (quotedText == null)
|
if (quotedText == null)
|
||||||
{
|
{
|
||||||
part = MimeUtility.findFirstPartByMimeType(message, "text/plain");
|
part = MimeUtility.findFirstPartByMimeType(message, "text/plain");
|
||||||
if (part != null) {
|
if (part != null)
|
||||||
|
{
|
||||||
quotedText = MimeUtility.getTextFromPart(part);
|
quotedText = MimeUtility.getTextFromPart(part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quotedText == null)
|
if (quotedText == null)
|
||||||
{
|
{
|
||||||
part = MimeUtility.findFirstPartByMimeType(message, "text/html");
|
part = MimeUtility.findFirstPartByMimeType(message, "text/html");
|
||||||
if (part != null) {
|
if (part != null)
|
||||||
|
{
|
||||||
quotedText = (Html.fromHtml(MimeUtility.getTextFromPart(part))).toString();
|
quotedText = (Html.fromHtml(MimeUtility.getTextFromPart(part))).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1897,7 +1899,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
mSourceMessage.getRecipients(RecipientType.TO)),
|
mSourceMessage.getRecipients(RecipientType.TO)),
|
||||||
Address.toString(
|
Address.toString(
|
||||||
mSourceMessage.getRecipients(RecipientType.CC)));
|
mSourceMessage.getRecipients(RecipientType.CC)));
|
||||||
if (quotedText != null) {
|
if (quotedText != null)
|
||||||
|
{
|
||||||
|
|
||||||
quotedText = quotedText.replaceAll("\\\r", "");
|
quotedText = quotedText.replaceAll("\\\r", "");
|
||||||
mQuotedText.setText(text);
|
mQuotedText.setText(text);
|
||||||
|
@ -318,7 +318,8 @@ public class MessageList
|
|||||||
|
|
||||||
private Context context = null;
|
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
|
class MessageListHandler
|
||||||
{
|
{
|
||||||
|
@ -243,11 +243,13 @@ public class Prefs extends K9PreferenceActivity
|
|||||||
{
|
{
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue)
|
public boolean onPreferenceChange(Preference preference, Object newValue)
|
||||||
{
|
{
|
||||||
if ((boolean)(Boolean)newValue == true) {
|
if ((boolean)(Boolean)newValue == true)
|
||||||
|
{
|
||||||
onChooseRegisteredNameColor();
|
onChooseRegisteredNameColor();
|
||||||
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_changed);
|
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_changed);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_default);
|
mChangeRegisteredNameColor.setSummary(R.string.global_settings_registered_name_color_default);
|
||||||
}
|
}
|
||||||
mChangeRegisteredNameColor.setChecked((Boolean)newValue);
|
mChangeRegisteredNameColor.setChecked((Boolean)newValue);
|
||||||
|
@ -38,7 +38,8 @@ public class Address
|
|||||||
private static final Address[] EMPTY_ADDRESS_ARRAY = new Address[0];
|
private static final Address[] EMPTY_ADDRESS_ARRAY = new Address[0];
|
||||||
private static Map<String,String> sContactsName = new ConcurrentHashMap<String, String>();
|
private static Map<String,String> sContactsName = new ConcurrentHashMap<String, String>();
|
||||||
|
|
||||||
public static void clearContactsNameCache() {
|
public static void clearContactsNameCache()
|
||||||
|
{
|
||||||
sContactsName.clear();
|
sContactsName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +264,8 @@ public class Address
|
|||||||
|
|
||||||
if (name != null && name != NO_ENTRY)
|
if (name != null && name != NO_ENTRY)
|
||||||
{
|
{
|
||||||
if (K9.changeRegisteredNameColor()) {
|
if (K9.changeRegisteredNameColor())
|
||||||
|
{
|
||||||
SpannableString sname = new SpannableString(name);
|
SpannableString sname = new SpannableString(name);
|
||||||
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
|
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
|
||||||
0,
|
0,
|
||||||
@ -272,7 +274,8 @@ public class Address
|
|||||||
);
|
);
|
||||||
return sname;
|
return sname;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -287,10 +290,12 @@ public class Address
|
|||||||
{
|
{
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
name = contacts.getName(cursor); // name might return null
|
name = contacts.getName(cursor); // name might return null
|
||||||
if (name != null) {
|
if (name != null)
|
||||||
|
{
|
||||||
sContactsName.put(mAddress, name);
|
sContactsName.put(mAddress, name);
|
||||||
|
|
||||||
if (K9.changeRegisteredNameColor()) {
|
if (K9.changeRegisteredNameColor())
|
||||||
|
{
|
||||||
SpannableString sname = new SpannableString(name);
|
SpannableString sname = new SpannableString(name);
|
||||||
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
|
sname.setSpan(new ForegroundColorSpan(K9.getRegisteredNameColor()),
|
||||||
0,
|
0,
|
||||||
@ -299,7 +304,8 @@ public class Address
|
|||||||
);
|
);
|
||||||
return sname;
|
return sname;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,8 @@ public class MimeUtility
|
|||||||
String extension = filename.substring(filename.lastIndexOf('.')+1).toLowerCase();
|
String extension = filename.substring(filename.lastIndexOf('.')+1).toLowerCase();
|
||||||
returnedType = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
returnedType = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||||
}
|
}
|
||||||
if (returnedType != null) {
|
if (returnedType != null)
|
||||||
|
{
|
||||||
return returnedType;
|
return returnedType;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -180,7 +180,8 @@ public class LocalStore extends Store implements Serializable
|
|||||||
+ "DELETE FROM headers where old.id = message_id; END;");
|
+ "DELETE FROM headers where old.id = message_id; END;");
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (mDb.getVersion() < 30)
|
||||||
{
|
{
|
||||||
|
@ -119,7 +119,8 @@ public class MessageProvider extends ContentProvider
|
|||||||
holder.uri,
|
holder.uri,
|
||||||
CONTENT_URI + "/delete_message/"
|
CONTENT_URI + "/delete_message/"
|
||||||
+ message.getFolder().getAccount().getAccountNumber() + "/"
|
+ message.getFolder().getAccount().getAccountNumber() + "/"
|
||||||
+ message.getFolder().getName() + "/" + message.getUid() });
|
+ message.getFolder().getName() + "/" + message.getUid()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user