Commit Graph

76 Commits

Author SHA1 Message Date
Mihai Preda 1575e7860d MessageCompose: fix delete quoted on reply/forward for EAS.
Also fix display of quoted html text for a draft (Exchange 2007).

Bug 2363249
Bug 2444496
2010-02-17 15:28:25 +01:00
satok 2a41aa538f Add Signature to Email Composer
Bug: 1323618

- Add signature to the message
- Set selection just after the message
- Add tests for signature
2010-02-14 00:41:48 +09:00
Mihai Preda e3e65ed919 MessageCompose: properly remove quoted text from saved draft.
Bug 2363249.
2010-01-26 17:19:49 +01:00
Mihai Preda f9623b9e78 MessageCompose: show account name in title.
Bug 2338152.
2010-01-21 14:47:18 +01:00
Mihai Preda 55f5256761 MessageCompose: fix NPE cased by WebView set to null in onDestroy().
Bug 2329276.
2009-12-16 18:12:34 +01:00
Mihai Preda 3afd66cda8 MessageCompose: disable "save as draft" button logic.
Bug 2184404
Disable "save as draft" button when there are no changes to be saved.
2009-10-15 12:09:38 +02:00
Marc Blank 2c74ee56a4 Prevent EmailAddressAdapter from leaking cursors; load in bg
* Relates to a number of bugs related to ANR's and slow behavior
  when addressing mail
* Call changeCursor(null) on the Adapter when the activity is destroyed
* Call getCount() in the background thread to force data there rather
  than in the UI thread
* If this change is accepted, something equivalent should be
  used in the Gmail app as well
* Addresses #2180237 (P1, target Eclair_Sholes) as well as
  #2180976 and #2146926, the latter two of which were fixed
  with workarounds.

Change-Id: I7503c5fbe091dbc5e784d5a7bebeb3d60226d57d
2009-10-12 13:54:05 -07:00
Mihai Preda 1a377f096f MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there's no source message, to avoid duplicated email addresses on orientation change.
Bug 2180955.
2009-10-12 13:39:42 +02:00
Mihai Preda 73032f4657 Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
Bug: 2167479
2009-10-08 11:58:45 +02:00
Andrew Stadler eb7752bf69 Fix back-to-back message-id bugs
* MessageCompose now adds message-id to new messages (it was previously
    done on its behalf by MimeMessage).
* LegacyConversions.updateMessageFields() now handles missing message-id
    without error.
* Unit tests for the LegacyConversions change

These two issues were combining with a failure of comcast's SMTP server
to insert message-id headers, to prevent delivery of a message between
any two comcast accounts using this client.

Bug # http://b/issue?id=2161478
2009-10-06 14:20:09 -07:00
Mihai Preda 85d718cb07 MessageCompose: quote plain-text body if available, otherwise quote HTML body.
Bug 2082852.
2009-10-06 16:50:54 +02:00
Mihai Preda 1197ac7692 MessageCompose: allow sending email when started through external intent.
Bug: 2161199.
2009-10-02 15:53:28 +02:00
Marc Blank 2f222b4b86 Fix mail sending for new message (#2158054)
Change-Id: I18fdf62f10ca350731446728b6095dabbc049bc1
2009-09-30 17:24:47 -07:00
Marc Blank 059b3e5ed5 Make sure intro text is saved/restored properly (fix #2155286)
Change-Id: I015783972e685472ea27cbdb854511e918d8f35e
2009-09-30 08:56:32 -07:00
Mihai Preda 2ab30ce247 MessageCompose: avoid saving Draft early, before the message was loaded.
And correctly set mDraftNeedsSaving when started through external intent.

Bug: 2149148, 2152044.
2009-09-29 15:47:00 +02:00
Mihai Preda 2dd894df2f MessageCompose: fix unit tests that were broken by CL 27435.
Bug 2150598.
2009-09-29 11:19:01 +02:00
Mihai Preda 02fcd3b4e7 MessageCompose: fix loading the quoted text after a configuration change.
Bug 2136283.

Because of the mSourceMessageProcessed guard, the loading after a config change
was done exclusively by the default view hierarchy save/restore.

But this default view restore does not handle WebView content,
thus affecting the quoted text.
2009-09-28 18:07:33 +02:00
Mihai Preda 7768ce276e MessageCompose: delete the attachments that are removed in the UI.
Bug 2139949.
2009-09-28 18:04:06 +02:00
Andrew Stadler 92a1ff9b77 Per spec, allow all attachments to be added via INTENT.
* Change manifest intent-filter to */*
* Split incoming whitelist into send_ui and send_intent versions

Bugs:  2097457 (general) & 2138790 (.vcf)

Change-Id: Id4a2bb3a75808811578c643a7b841de9491efce4
2009-09-27 23:49:10 -07:00
Andrew Stadler 9d249df5b8 Add WebViewClient to specialize link-click behaviors.
* If external, set FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
* If mailto: always open the composer

Fixes bugs 1631784 and 2122326
2009-09-27 17:23:46 -07:00
Andrew Stadler b422bda4d6 Messages upsynced to "sent" should be marked as "read".
Part of cleanup of bug 2097471 but also addresses old bug 1362964.
2009-09-25 16:42:36 -07:00
Andrew Stadler c41c47fa07 Enable message upload
* Create logic to detect upsyncable messages in Sent
* Note:  Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
    uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support

Bug # 2097471

TODO (next CL): Upload attachments records too

Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
2009-09-25 14:54:32 -07:00
Mihai Preda 1033fe606c MessageCompose: correctly handle saving Draft in relation to restarting the activity on configuration change.
Avoids saving multiple drafts when opening/closing the keyboard.
Bug 2133003.
2009-09-25 12:29:36 +02:00
Mihai Preda d66b465776 Fix loading the quoted text when editing draft.
Bug 2140036.

Only load the reply fields for an edit-draft situation.
2009-09-24 15:04:03 +02:00
Mihai Preda 0dbc15e6f1 Email: catch RuntimeException when loading message with huge body from DB.
Bug: 2133062.
2009-09-24 11:58:16 +02:00
Marc Blank 5fc57eccef Fix reply/forward for both SMTP and EAS; fixes #2138725
* Add new introText column in the Body database
* Reply/Forward put the appropriate String into this new column
* Rfc822Output uses this when required when streaming the message

Change-Id: I34602fdb3f91692c46fc8bc31ba0e6f680d445a0
2009-09-23 07:31:01 -07:00
Marc Blank a740e29357 Fix bugs related to orientation change in MessageCompose
* Save reference to LoadMessageTask and cancel it in onDestroy
* Check whether we've already processed the source message
  before calling processSourceMessage
* Fixes #2097361 (Duplicate addresses in reply/reply all)
* Fixes NPE (not in Buganizer) related to fast orientation changes
  due to duplicated background task

Change-Id: Ib8115e29c9d88db1be009df4f549f925db8a1c19
2009-09-20 13:03:44 -07:00
satok d2174733b1 Auto-sync of stale mailboxes
BUG: 2050116
- auto sync onResume
- add mNonPushMode
-- mNonPushMode is updated in SetFooterTask
2009-09-15 14:38:13 +09:00
Marc Blank f2dded3a2f Reimplement reply/forward to use mTextReply/mHtmlReply
* Move creation of final reply/forward text (i.e. new text plus
  the original) to Rfc822Output, where it belongs.
* Prepares the way for use of SmartForward/SmartReply in
  Exchange and replying w/ multipart/alternative in SMTP
* Moved test from MessageCompose to new Rfc822OutputTests, and note
  that new tests should be added (this is not a regression; there
  were never enough tests here)

Change-Id: Ibefb842f47cc9223714856d99b8d4f55b55f49e3
2009-09-13 22:28:38 -07:00
Andrew Stadler 6c21942ec4 Implement move-to-trash for IMAP and POP3.
* Define new message-loaded state "FLAG_LOADED_DELETED" (used only for
   POP3, which needs to write sentinel messages that are not displayed.)
* Also renamed the other flags to make the naming more consistent.
* Tweak MessageList query generation to inhibit display of deleted
    message sentinels, and MessagingController won't try to resync them.
* Clean up implementation of Controller.deleteMessage()
* Add support for move to trash to MessagingController.  This operates
    in three primary modes:
  * POP3 local delete (no server-side interaction)
  * POP3 server delete
  * IMAP server delete (and copy to IMAP trash mailbox)
* Add missing implementation in provider to delete all of the attachments
    for a given message
* Fix progress reporting in activities (the test for error vs. progress
    was inverted, which caused progress indicators to keep spinning
    after errors.)
* Fix broken account settings UI (POP3 delete policy was not persisting)

Addresses bug 2097409

TODO delete from trash / empty trash

Change-Id: I00188e6dc2093823106e009f35b68c760227c9e6
2009-09-10 12:44:05 -07:00
Marc Blank 6d1271aee7 Fix crash in large tests (#2108431)
Change-Id: I82a0ec81361b722bfa1cb4f197e3c999936ff192
2009-09-09 11:14:48 -07:00
Marc Blank e256983193 Add sourceKey to Body table; add flags for reply/forward in Message
* Set reply/forward flag and sourceKey as appropriate in MessageCompose
* Update provider tests accordingly

Change-Id: I7f49d80a735314a1a38f09fbf1f234257c41af8c
2009-09-08 16:42:53 -07:00
Dmitri Plotnikov a5b855898d Re-enabling email suggestions and switching to new contacts API. 2009-09-06 11:50:35 -07:00
Marc Blank b8d0c55a05 Fix reply all behavior to prevent duplicates, etc.
* Also create a bogus account if none exists to prevent setup failure
* Fixes #2087413 (Email large tests failing with Unknown URI)
* Fixes #2097361 (Duplicate email address when replying...)

Change-Id: I9ca2ac5f98db43e9009c22421c69956440356e34
2009-09-04 20:39:02 -07:00
Mihai Preda 3113ae67fd MessageCompose: Bug 2078435, Correctly set the attachement flag.
- display "saved as draft" toast for save draft.
- don't display tost for send.
- don't cancel the sender task, let it complete.
- synchronize on mDraft although not sure that it's needed.
2009-09-04 18:14:27 +02:00
Mihai Preda fa2238ca40 Email: BUG 1964940 Support multiple share from Gallery in Email 2009-09-02 15:38:48 +02:00
Mihai Preda 948e5ae63b MessageCompose: BUG 2069196, compose email from the correct account. 2009-08-28 01:29:33 +02:00
Mihai Preda ea0fea2558 MessageCompose: bug 2080075 & 2077496.
- fix bug 2080075, reply to message without text body.
- workaround bug 2077496 by temporarilly disabling the address adapter.
- unit test for MessageCompose.buildBodyText()
- use precompiled regex
2009-08-26 21:49:31 +02:00
Andrew Stadler df86adf873 Finish the code to demand-load partially loaded messages.
This happens in two primary cases:
1.  When a very large POP message was skipped during initial sync
2.  When any message was interrupted during initial sync, e.g. by
    a dropped connection.

Changes:
* Added loadMessageForView and callbacks to Controller (and touched all
    files with Controller listeners)
* Rewrote loadMessageForView in legacy MessagingController to work with
    provider.
* Update flow in MessageView to use loadMessageForView when needed.
* Restored the use of "loading.html" and "empty.html" assets (although
    I think we should replace them with simple layouts & views.)
* Some random cleanup in MessageView

Satisfies bug # 2065563
2009-08-25 10:13:35 -07:00
Andrew Stadler 4b41bae270 Enable IMAP/POP sending and EAS resend
* Finish IMAP/POP sections of Controller.sendMessage
* Rewrite MessagingController.sendPendingMessagesSynchronous
* Add deleteAllAttachmentFiles to AttachmentProvider, and unit test
* Rework sendMessage callbacks and integrate into MessageList UI
* Send pending from UI

TODO:
* Find other places from which to call deleteAllAttachmentFiles
2009-08-20 11:09:39 -07:00
Mihai Preda 44144d0301 MessageCompose: initial save attachments and load them back.
- load attachments for EditDraft.
- save attachments when save message.
- unit test for restoreAccountsWithMessageId()
2009-08-20 15:52:50 +02:00
Andrew Stadler 46d7d7f1b6 Rework service to use provider accounts and controller.
* Rewrite service logic to select and update one account at a time
* Add checkmail API to Controller, and much rework/cleanup of existing
   callback API's
* Rewrite notification posting code
* Rewire connection to MessageList to be opened by notifications, to
   cancel notifications, and to reset the "new message" count whenever
   an account is viewed.
* Boilerplate cleanup to a lot of activities because they share the
   callbacks that have had minor changes.
* Remove old push controls from Store API

In progress:
* To provide notification mechanism for EAS pushed mail
2009-08-18 00:54:34 -07:00
Mihai Preda 9627d014e1 MessageCompose: update body on save.
- plus unit tests.
- and some attachment refactoring.
- move PROJECTION_ID up to EmailContent.
- add index on messageKey to Attachments and Body tables.
- add missing Columns.ID field in EmailContent.
2009-08-17 13:43:56 +02:00
Mihai Preda a5af05f1a9 MessageCompose: load body.
- load body for edit-draft, replay, forward.
- fix debug secret code for no-keyboard devices.
- fix CR-LF BUG 1911254.
- fix menu invoke compose from folder with mailboxId < 0.
2009-08-06 11:40:42 +02:00
Mihai Preda 2917e895c7 MessageCompose:
- set displayName for composed messages (from To:)
- set FLAG_LOADED
- do the save & send in an AsyncTask
- some clean-up
2009-08-03 13:04:21 +02:00
Andrew Stadler 8f7f93a7b3 Enable account & mailbox sync for exchange
* Now attempts folder list sync for exchange
    (goto folder list and click sync)
* Folder sync never seems to call our callback - bug in EAS side?

* Now attempts mailbox sync
    (go to an EAS mailbox and click sync)

Also:
* Cleanup start/stop/error path for IMAP/POP as well
* Small bugfix in SyncManager.java (was calling wrong callback)
* No longer trying to set mailbox read/unread count in IMAP/POP
2009-07-30 18:48:12 -07:00
Andrew Stadler ea69fc40d7 Rework Controller to use new single callback from EAS.
* Use unified callback instead of per-call callbacks
* Remove per-call tag
* Rework MessageView to operate without tag
* Minor cleanups in service side
2009-07-29 18:36:01 -07:00
Mihai Preda 334903369e initial Controller.sendMessage() and invocation from MessageCompose. 2009-07-28 20:48:42 +02:00
Mihai Preda 3e79032dd1 Fix MessageCompose tests.
BUG 2017612.
2009-07-28 16:27:04 +02:00
Mihai Preda 0712ce063c Load source message in UI in MessageCompose for reply/forward/edit-draft.
Replace EmailContent.Message with Message.
Remove MessageCompose.mAccountId (mAccount is enough).
2009-07-27 21:22:37 +02:00