1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00
k-9/res/layout
Joe Steele bfb0316583 Fix fatal IndexOutOfBoundsException
The problem:

Configure the account (just an example -- problems can occur in other
configurations as well):
Message Format: HTML
Reply quoting style: Prefix
Quote message when replying: yes
Reply after quoted text: yes

Reply to a message that has a large quantity (20+) of \r\n scattered in
the body of its HTML version (not an unusual scenario).

Add a reply.  Save the message as a draft.  Go back & open the draft
again.  A fatal IndexOutOfBoundsException occurs.

The cause:

When the draft was saved, the X-K9mail-Identity header was computed and
added to the message, then the text of the message was processed with
MimeUtility.fixDraftTextBody, replacing all occurrences of \r\n with \n in
the quoted message before being saved in LocalStore, thus invalidating the
X-K9mail-Identity header.

The fix:

Remove MimeUtility.fixDraftTextBody and implement
MessageCompose$EolConvertingEditText instead.  Any message text placed in
an EolConvertingEditText widget is assured to have \n line endings.  Any
message text extracted from an EolConvertingEditText widget is assured to
have \r\n line endings.  The X-K9mail-Identity header will always be
computed correctly.

Issues thought to be related:  4782, 5010, 5634, 5725

As noted in some of the referenced issues, errors didn't always result in
a fatal exception, but instead with mixed up text.

Ref:  commit f9a35aeaee
2013-10-11 11:39:15 -04:00
..
accessible_email_content.xml Merge branch 'ideal-screenreader' 2010-08-18 02:01:10 +00:00
account_list.xml Remove (now redundant) background from layouts to reduce overdraw 2012-12-13 07:28:35 +01:00
account_setup_account_type.xml Backporting small ui cleanups to the account setup from kaiten 2012-09-24 12:34:22 -04:00
account_setup_basics.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
account_setup_check_settings.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
account_setup_composition.xml Applied patch by ndarilek (thanks!) to add android:contentDescription attributes to unlabeled input fields to improve accessibility. 2010-07-08 12:18:12 +00:00
account_setup_incoming.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
account_setup_names.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
account_setup_options.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
account_setup_outgoing.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
accounts_folders_icons.xml Tighten up the account list display for narrow-screened devices like the HTC One 2013-07-21 10:42:31 -04:00
accounts_item.xml Return to old style chips for accounts, folders and messages. 2013-08-22 20:56:55 -04:00
accounts_password_prompt.xml Removed hardcoded strings from layout 2011-11-05 19:53:27 +01:00
accounts.xml Remove (now redundant) background from layouts to reduce overdraw 2012-12-13 07:28:35 +01:00
actionbar_custom.xml message view: fix subject bugs 2013-02-11 13:47:31 +01:00
actionbar_indeterminate_progress_actionview.xml Fix progressindicator on folderscreen. 2012-09-08 21:40:57 -07:00
actionbar_indeterminate_progress.xml Fix the upper refresh button in MessageList 2012-09-08 21:40:56 -07:00
choose_account_item.xml Display a dark-themed "Send as" dialog when using the dark theme on HC+ 2012-09-16 03:24:40 +02:00
choose_identity_item.xml Removed unnecessary layout containers 2012-03-24 22:51:33 +01:00
color_picker_dialog.xml Add (heavily modified) HoloColorPicker 2013-01-17 09:03:11 +01:00
edit_identity.xml Added option to specify Reply-to address for an identity. Patch provided by fiouzy (Thanks!). 2010-06-20 12:48:22 +00:00
email_address_list_item.xml Change layout of the email address list. 2012-04-08 12:32:10 -04:00
email_address_list.xml Make ListView in EmailAddressList use the full screen height 2012-04-09 02:02:12 +02:00
empty_message_view.xml Extract string to strings.xml 2013-02-01 03:34:35 +01:00
folder_list_item.xml clean up the folder list item chips 2013-08-22 21:08:51 -04:00
folder_list.xml Remove (now redundant) background from layouts to reduce overdraw 2012-12-13 07:28:35 +01:00
list_content_simple.xml Explicitly set layout used in a ListActivity 2013-01-18 12:33:31 +01:00
message_compose_attachment.xml Fetch attachments while MessageCompose activity is running 2013-09-25 03:12:34 +02:00
message_compose.xml Fix fatal IndexOutOfBoundsException 2013-10-11 11:39:15 -04:00
message_list_fragment.xml Avoid saved state being discarded when message list is modified 2013-02-05 20:00:31 +01:00
message_list_item_footer.xml Remove the progress bar from the message list footer. 2013-01-10 16:50:21 -05:00
message_list_item.xml update the new message list item to work better in various odd configurations 2013-08-22 21:08:51 -04:00
message_list_loading.xml Add an "empty view" to the message list 2012-12-06 06:26:39 +01:00
message_list.xml Add animation when switching from message list to message view 2013-02-02 02:21:20 +01:00
message_view_attachment.xml MessageView: another theme fix 2013-02-05 23:12:52 +01:00
message_view_crypto_layout.xml Move as much of the Apg code as possible to its own "view" class 2011-02-10 14:02:21 -05:00
message_view_header.xml Return to old style chips for accounts, folders and messages. 2013-08-22 20:56:55 -04:00
message.xml First very basic version of a split screen for message list + view 2013-01-24 13:04:06 +01:00
recipient_dropdown_item.xml Don't use AutoCompleteTextView text color workaround on API 11+ devices 2012-09-14 05:50:09 +02:00
split_message_list.xml Add animation when switching from message list to message view 2013-02-02 02:21:20 +01:00
unread_widget_layout.xml Change appearance of unread widget 2013-03-16 01:57:21 +01:00
upgrade_databases.xml Add activity that is displayed during database upgrades 2012-12-01 08:02:55 +01:00
welcome_message.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
wizard_cancel.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
wizard_done.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
wizard_next.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
wizard_setup.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00
wizard_welcome.xml Change style for button bar in setup (Android 3+) 2013-03-08 03:17:22 +01:00