1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-13 06:38:05 -05:00
This commit is contained in:
Jesse Vincent 2010-07-13 21:16:56 +00:00
parent a85c83f696
commit 70a1eef943
3 changed files with 34 additions and 27 deletions

View File

@ -128,10 +128,12 @@ public class MimeBodyPart extends BodyPart
{ {
int first = contentId.indexOf('<'); int first = contentId.indexOf('<');
int last = contentId.lastIndexOf('>'); int last = contentId.lastIndexOf('>');
if (first != -1 && last != -1) { if (first != -1 && last != -1)
{
return contentId.substring(first+1, last); return contentId.substring(first+1, last);
} }
else { else
{
return contentId; return contentId;
} }
} }

View File

@ -2068,7 +2068,8 @@ public class LocalStore extends Store implements Serializable
{ {
Cursor cursor = null; Cursor cursor = null;
cursor = mDb.query("messages", new String[] { "html_content" }, "id = ?", new String[] { Long.toString(messageId) }, null, null, null); cursor = mDb.query("messages", new String[] { "html_content" }, "id = ?", new String[] { Long.toString(messageId) }, null, null, null);
try { try
{
if (cursor.moveToNext()) if (cursor.moveToNext())
{ {
String new_html; String new_html;
@ -2081,8 +2082,12 @@ public class LocalStore extends Store implements Serializable
mDb.update("messages", cv, "id = ?", new String[] { Long.toString(messageId) }); mDb.update("messages", cv, "id = ?", new String[] { Long.toString(messageId) });
} }
} }
finally { finally
if (cursor != null) { cursor.close(); } {
if (cursor != null)
{
cursor.close();
}
} }
} }