Commit Graph

381 Commits

Author SHA1 Message Date
Andrew Stadler
a396a9bf14 Minor cleanups (layout only) 2009-07-07 11:36:04 -07:00
Android (Google) Code Review
5e444dd794 Merge change 5793
* changes:
  Major refactor and cleanup of EAS code
2009-07-07 11:17:48 -07:00
Marc Blank
b6493a07ef Major refactor and cleanup of EAS code
* Rewrote push logic to encompass multiple folders (i.e. calendar/contacts)
    * Change inbox from push frequency to ping frequency after initial sync
    * Implement upsync logic for email (i.e. sending changes to the server)
    * Did cleanup of some files (there's still some to do) re: format, style
    * Initial one-way sync of Contacts data - add and delete are implemented
    * Created adapter package for all parts of the EAS adapter
    * Created utility package for utility code that will eventually be merged
      with code in the Email application (Base64, QuotedPrintable, etc.)
    * SyncManager/AbstractSyncService can be used in the future for other
      protocols, especially IMAP push
2009-07-07 00:30:24 -07:00
Andrew Stadler
61e6ff4521 Fixed minor typo in MessageView 2009-07-06 19:02:16 -07:00
Andrew Stadler
7c3cca80a0 Reenable delete-message UI and write delete-from-provider.
* Longpress delete in MessageList
* Delete or Menu-Delete in MessageView
* Add deleteMessage() to Controller
* Unit tests for the new code in Controller
2009-07-06 13:58:30 -07:00
Andrew Stadler
28448e782b Extract utilities from provider tests for use elsewhere. 2009-07-06 10:49:38 -07:00
Andrew Stadler
45f9dd22e1 Fix bug in GroupMessagingListener and add unit tests 2009-07-02 14:29:02 -07:00
Mihai Preda
54693e8446 am 543b50d7: Revert "Add Cox email server information."
Merge commit '543b50d71794ea2baa1d0ff21b494d225b1a14a0'

* commit '543b50d71794ea2baa1d0ff21b494d225b1a14a0':
  Revert "Add Cox email server information."
2009-07-01 22:44:47 -07:00
Andrew Stadler
bb0f962dbb Enable message read/unread toggling
* Automatically marked read when entering MessageView
* Marked unread via menu selected during MessageView
* Provider updated (directly - see note)
* Enable context menu in MessageList and enable "open" & toggle unread

NOTE: Does not use the correct service notifications yet;  Just updates
the providers.

NOTE: The UI for the context menu is incomplete, it says "mark as read"
but it actually toggles the state.  The true UI is to flip the text to
match the current state e.g. "mark as read" or "mark as unread".  That
will be much simpler to implement when we switch to a custom list item
view class, where we can cache the read/unread state (and other tidbits).
2009-07-01 16:04:30 -07:00
Andrew Stadler
48c8cc34b7 Add "favorite" star to MessageView
* Shown next to subject (non-final layout)
* Value taken from provider data
* Tapping star toggles state
* State writes back to provider

NOTE:  I am currently doing the provider writeback via direct provider
calls (using the synced-message URI) but not doing it with a service call,
so at this point there is no triggering of any server-side update.
However a sync engine might "discover" the change.

NOTE:  I made a global change of "mMessage" to "mOldMessage" because
there is still a lot of legacy code in MessageView and I wanted to clearly
demarcate the code that still needs to be redone.
2009-07-01 12:11:47 -07:00
Android (Google) Code Review
696b8749b5 am 984b4ed5: Merge change 5395 into donut
Merge commit '984b4ed57fe02b68a6a2b371c84c8d7d6ee2325c'

* commit '984b4ed57fe02b68a6a2b371c84c8d7d6ee2325c':
  Add Cox email server information.
2009-07-01 11:18:11 -07:00
Andrew Stadler
7c3de93429 Add attachments, favorites, and selections to MessageList.
* Attachment icon is displayed when message.mAttachment != 0
* Favorite icon is set/cleared from message but not clickable
* Selection icon is not clickable

Further progress requires implementing a custom child view which can
handle sub-clicks properly.
2009-07-01 10:47:23 -07:00
Andrew Stadler
4765472db8 Add MessageList activity
* Add MessageList Activity class and Manifest entry
* Add appropriate layouts, views, etc.
* Wire into FolderMessageList

Lots to do, but this gives us a useable screen.
2009-06-30 15:15:07 -07:00
Mihai Preda
543b50d717 Revert "Add Cox email server information."
This reverts commit f6ab8aaec8.

Revert because TMO IPs are rejecteb by Cox SMPT server for
spam reasons (spamhouse filtering).

Revert while waiting for a solution to be found by TMO/Cox.
2009-06-30 11:26:49 -07:00
Mihai Preda
b7e954bba6 Fix ConcurrentModificationException in MessagingController.
The exception was caused by removing from the HashSet (in Controller.java)
while iterating over it. The locking offered no protection in that case.

Extracted the notification of listeners (MessagingListener) in separate class
to simplify reimplementation.

Got rid of a couple of generic catch(Exception) that were hiding surprises.
2009-06-30 11:22:43 -07:00
Andrew Stadler
ddc871d9ed Fixed a few EmailProvider omissions; added tests
* EmailProvider query wasn't handling queries for deleted messages
* EmailProvider wasn't catching exceptions on some 'drop table' ops
* Added tests of synced messages (delete and update)
2009-06-29 23:08:40 -07:00
Takaoka G. Tadashi
2ed5063274 am 4f23ebd3: Fixed Pop3Store to be able to delete message in Inbox.
Merge commit '4f23ebd3dcca596533a33e6faedb446a814d32e3'

* commit '4f23ebd3dcca596533a33e6faedb446a814d32e3':
  Fixed Pop3Store to be able to delete message in Inbox.
2009-06-29 20:20:23 -07:00
Android (Google) Code Review
984b4ed57f Merge change 5395 into donut
* changes:
  Add Cox email server information.
2009-06-29 15:54:57 -07:00
Mihai Preda
f6ab8aaec8 Add Cox email server information.
Bug 1942352.
2009-06-29 15:40:11 -07:00
Marc Blank
73018c31d6 Add new mailbox types for use by EAS 2009-06-27 17:21:44 -07:00
Marc Blank
f374304e92 Add support for sync related provider operations
There is now a deleted table as well as an updated table for Messages,
and some new URIs that are well documented in EmailProvider
2009-06-27 14:41:41 -07:00
Takaoka G. Tadashi
4f23ebd3dc Fixed Pop3Store to be able to delete message in Inbox.
When delete policy is DELETE_POLICY_ON_DELETE, PENDING_COMMAND_TRASH
will be invoked. But in POP3 account, because of 1) Inbox is
OpenMode.READ_ONLY, 2) getMessage(uid) just after open() is not work
correctly, 3) remote Inbox folder is not closed after deleting message,
PENDING_COMMAND_TRASH does not work.  And also the fat that some POP3
server use UID with '-' prevents PENDING_COMMAND_TRASH to recognize
the message is remote message.

Internal Bug: 1651709
2009-06-26 10:36:27 +09:00
Andrew Stadler
7143d969dd Add unit tests for Provider and fix bugs that were found
Uses a mock provider to avoid touching production databases.
Includes utilities for creating accounts, mailboxes, and messages.
Tests basic object creation & readback, object deletion, and some
forms of hierarchical deletion.  Has many TODO notes for additional
tests to be written.

In EmailContent, found & fixed a few fields that weren't being written to
the database properly.
2009-06-25 00:02:29 -07:00
Android (Google) Code Review
c3905eccdd Merge change 4842
* changes:
  Don't drop invalid addresses while editing & check that all addresses are valid before send.
2009-06-24 15:49:02 -07:00
Mihai Preda
ed0e683d86 Don't drop invalid addresses while editing & check that all addresses are valid before send.
BUG: 1542391
add unit tests.
2009-06-24 15:44:08 -07:00
Andrew Stadler
5f4dbd6438 Attempt to download small messages, and POP messages.
POP doesn't supply headers in the ENVELOPE phase, so we have to
explicitly ask for, download, copy, and save small message bodies.

Fix bug in EmailProvider (it was not always detaching the body db),
leaving the DB locked in some situations.

Problems outstanding:
* POP messages are committed before they have headers, which leads
to blank entries in the UI.  It might be worth tagging them and
selecting them out until they're ready to display.
* Inefficient because we're reloading the message from the provider on
each pass, instead of hanging onto it and updating it.
* Not marking "complete" yet because we aren't handling attachments
or inline images yet.  So we keep on reloadin'.
2009-06-24 12:48:57 -07:00
Marc Blank
1cdb4077d9 Only sync EAS mailboxes 2009-06-24 09:57:05 -07:00
Marc Blank
09d13e6295 Clean up Exchange code
Clean up imports to point to the com.android.exchange version of EmailContent
Clean up some line wrapping
Update EmailContent with latest version from Email project
2009-06-23 17:59:27 -07:00
Andrew Stadler
dd46221bd8 Add aidl files to Email makefile to fix build. 2009-06-23 13:53:08 -07:00
Marc Blank
2c67f1f8b8 Initial submission for EAS support (email)
* There is some temporary code ensuring that SyncManager runs (this will be removed when Exchange
is entirely independent)
* The service interface (aidl) is in place for most user-facing actions (load more, start sync, etc.)
* EAS account validation is done via aidl
* Folder and message sync appear to be functional in this early submission
* Provider now does cascading deletes (Account -> HostAuth and Mailbox, Mailbox -> Message,
  Message -> Attachment and Body)
2009-06-23 13:13:42 -07:00
Andrew Stadler
553603337a Quick cleanups of FolderMessageList and MessageView
Show date/time properly
Unpack from, to, cc, bcc
2009-06-22 21:56:04 -07:00
Andrew Stadler
7b0b463477 List messages from MessagingController & Stores.
* update MessageListener callbacks and remove the callbacks that
  edit data (this comes through the provider now).
* provide simple linkage via Controller to sync a mailbox
* update FolderMessageList to trigger mailbox sync
* rewrite synchronize to push messages into provider
* small improvements to FML (sorting;  show read/unread status)
* note: trailing whitespace cleanup in some files
2009-06-22 16:13:03 -07:00
Marc Blank
33e176f491 Remove the bodyId column in the message base for consistency
Foreign keys belong in the child, not the parent, as is done with other
EmailContent classes.  Therefore, Body has a messageKey, and Message has
no bodyKey.

Updated MessageView to use the proper query for retrieving a message body.
2009-06-22 12:13:06 -07:00
Andrew Stadler
07871c4ce7 Clean up code to delete account & delete mailbox.
Delete account was already written but needed to be cleaned out (and
removed vestiges of LocalStore code as well.)

Delete mailbox required some new code in listFolders.  This happens
every time we refresh an account.
2009-06-22 11:39:40 -07:00
Mihai Preda
6c5460886f am a4926736: Review Email tests annotations (small/medium/large) and change some annotations based on time.
Merge commit 'a492673609111fe8c41ae152d62547b267346502'

* commit 'a492673609111fe8c41ae152d62547b267346502':
  Review Email tests annotations (small/medium/large) and change some annotations based on time.
2009-06-18 13:12:45 -07:00
Mihai Preda
a492673609 Review Email tests annotations (small/medium/large) and change some annotations based on time.
Fix an NPE appearing when running the test suite.

BUG: 1566281, 1910409.
2009-06-18 12:16:28 -07:00
Andrew Stadler
bcec088320 Begin implementation of new master controller
The first thing we'll implement is a function to list remote folders,
and it will call the existing MessagingController to do that for IMAP
and POP3.

Also change default folder type # order to get desired order in UI
2009-06-17 16:15:37 -07:00
Android (Google) Code Review
19fd130680 Merge change 4482
* changes:
  Add URI's for updated messages, and Provider support for them
2009-06-17 11:26:11 -07:00
Marc Blank
e34525d0f0 Add URI's for updated messages, and Provider support for them
Messages that have been updated in the database live in a different table
and therefore can't be accessed in the provider without the added support.
2009-06-17 11:20:32 -07:00
Mihai Preda
94386cce2a am aeeefedb: Thumbnail cache file should be deleted when AttachmentProvider is created.
Merge commit 'aeeefedb43c40e887850654ac88270755f5631c1'

* commit 'aeeefedb43c40e887850654ac88270755f5631c1':
  Thumbnail cache file should be deleted when AttachmentProvider is created.
2009-06-16 16:43:07 -07:00
Mihai Preda
50a24d5e95 am 075e9d51: Added recursive limit check to renderAttachments method.
Merge commit '075e9d5104c0e23a6188677f5c9e99fcbcfdbc60'

* commit '075e9d5104c0e23a6188677f5c9e99fcbcfdbc60':
  Added recursive limit check to renderAttachments method.
2009-06-16 16:42:49 -07:00
Mihai Preda
d250bcd5cd resolved conflicts for merge of a830816f to master 2009-06-16 15:51:11 -07:00
Marc Blank
1f5a93936b Fix to bug in Message.save 2009-06-16 11:26:40 -07:00
Mihai Preda
aeeefedb43 Thumbnail cache file should be deleted when AttachmentProvider is created.
Integrates CL 149651 from p4 Docomo email.
Bug 1902523.
2009-06-15 18:35:38 -07:00
Mihai Preda
075e9d5104 Added recursive limit check to renderAttachments method.
Integrates CL 149561 from p4 Docomo email.
Bug 1897000.
2009-06-15 18:10:29 -07:00
Mihai Preda
a830816fe2 Updating attachment thumbnail after attachment or inline image has been downloaded.
Integrates 149560 from Docomo email.
2009-06-15 18:01:19 -07:00
Andrew Stadler
b5903285dd Enable MessageView using provider.
Very primitive, just shows a few headers, and no navigation at all (you
can only go "back" from here.
2009-06-15 16:46:38 -07:00
Andrew Stadler
1da551bd08 Fix build break, master # 4712 2009-06-15 15:21:43 -07:00
Marc Blank
a290f503f1 Refactored EmailStore, EmailContent, EmailProvider
EmailStore goes away, replaced by EmailContent
All database activity is moved to EmailProvider
2009-06-15 14:49:11 -07:00
Andrew Stadler
879318ee30 Add message list (from provider) to FolderMessageList.
1.  Use proper AsyncTask for all cursors
2.  Convert to CursorTreeAdapter and get data from cursors
3.  (Temporarily) block all context menus and other things that would
    crash.

With this CL you can view folders and see the message list but you cannot
view the messages (that's next).
2009-06-15 09:25:39 -07:00