Commit Graph

408 Commits

Author SHA1 Message Date
Android (Google) Code Review
d4c18546fb Merge change 7580
* changes:
  Eliminate Config.LOGV (deprecated, always false). Add Email.LOGD as a development log guard.
2009-07-16 14:51:12 -07:00
Mihai Preda
f33986d5cc Eliminate Config.LOGV (deprecated, always false).
Add Email.LOGD as a development log guard.
2009-07-16 14:09:15 -07:00
Android (Google) Code Review
0dba37ec51 Merge change 7552
* changes:
  Fix push bug, minor changes to logging and removal of debug code
2009-07-16 13:14:55 -07:00
Marc Blank
6a6d67edde Fix push bug, minor changes to logging and removal of debug code 2009-07-16 13:13:54 -07:00
Andrew Stadler
3c27c65426 Small cleanups to POP/IMAP sync.
* Close after sync, so next sync will open and update message count.
2009-07-16 10:19:19 -07:00
Marc Blank
976f92908d Add support for attachments in EmailProvider and (preliminary) EAS
* EmailProvider now saves Attachment records atomically with Message (and Body,
  of course) if an ArrayList is stored in mAttachments
* Update EAS code to support attachment discovery
* Update EAS code to support attachment download via service API (preliminary)
* Add test for atomic attachment save
* Add test for unique file creation (external)
2009-07-16 00:01:57 -07:00
Android (Google) Code Review
c5f783f022 Merge change 6675
* changes:
  First steps towards using the new EmailContent.Message in MessageCompose.
2009-07-15 14:13:31 -07:00
Andrew Stadler
f2fdd899ef Clean up new account creation & initial sync.
* Give MessageList the ability to do a folder scan (from server)
    in order to "find" the inbox after account creation.
* Don't show messages that haven't even been partially downloaded yet
    (reduces flicker during POP initial sync)
* Move some folder lookup code (in MessageList) out of UI thread
* Restore simple color chip code so multiple accounts look good
    in MessageList
2009-07-15 13:28:55 -07:00
Mihai Preda
c6893ddf0f First steps towards using the new EmailContent.Message in MessageCompose. 2009-07-15 13:13:45 -07:00
Android (Google) Code Review
80d59dabbb Merge change 7336
* changes:
  Fix bugs related to EAS upsync and the cleanup afterward.
2009-07-14 21:50:05 -07:00
Marc Blank
16470fc7db Fix bugs related to EAS upsync and the cleanup afterward. 2009-07-14 17:24:16 -07:00
Jean-Baptiste Queru
5ecebb93b8 Merge commit 'goog/readonly-korg-master' into merge_korg_master 2009-07-14 17:12:57 -07:00
Marc Blank
6b158f715b Handle UI delete in EAS where the message is moved to trash
* Check for the folder of updated messages, and delete those now in trash
* Created convenience method for finding a mailbox of a particular type in
  an account (helpful for finding, say, an Inbox or Trash for a given account
* Fix deleted/updated message table so that the _id column is defined to be
  unique (to prevent duplicate change records from being written)
2009-07-14 16:04:27 -07:00
Marc Blank
316bb44e1a Use MatrixCursor instead of (internal) ArrayListCursor 2009-07-14 14:49:34 -07:00
Andrew Stadler
2999db7866 Add Summary Section to AccountFolderList ("at a glance")
* Wrap group cursor in a MergeCursor to insert 1st row
* Clean up a few loose ends (e.g. no longpress on summary row)
* Implement the summaries child cursor
* Add special queries to MessageList for Inbox, Unread, Favorites

There are *a lot* of TODO's in this checkin;  I just wanted to get some
basic UI up and running so we could start to explore issues created by
the new configuration.  A lightweight sampling:
* Aggregrate filters (e.g. all inboxes) need to be handled in the
provider, instead of with the current two-query hack.
* We'll need a lot of UI cleanup, e.g. different contextual menus
* We'll need to generalize some of the code in order to more easily
support repeating the same compound queries - e.g. MessageView actually
needs the same query in order to enable the next/prev buttons.
2009-07-14 11:44:07 -07:00
Android (Google) Code Review
6087876941 Merge change 6962
* changes:
  Various EAS related changes related to accounts and services.
2009-07-14 08:46:53 -07:00
Andrew Stadler
17250429db Various EAS related changes related to accounts and services.
* Renamed ISyncManager/ISyncManagerCallback to IEmailService/IEmailServiceCallback
* Restored ExchangeTransportExample to its original state; created ExchangeStore to
  handle validation functionality instead; updated stores.xml to reflect these changes.
* Add support for AccountManager in EAS code (this is necessary for the contacts and
  calendar providers to work with syncable data); created EasAuthenticatorService to
  as our authenticator, which required adding authenticator.xml and modifying the
  manifest to register our service with AccountManager metadata
* Created EmailServiceProxy as a convenience for the UI in calling into the EAS
  service; created EmailServiceStatus class for status codes in callbacks.
2009-07-13 19:10:08 -07:00
Eric Fischer
7d614f38f4 Fix build breakage from automerge. 2009-07-13 17:14:07 -07:00
Eric Fischer
d0860a1f9a am f16f1297: Import new translations
Merge commit 'f16f1297bde8868873f86fa41148a50e6c0dfbf9'

* commit 'f16f1297bde8868873f86fa41148a50e6c0dfbf9':
  Import new translations
2009-07-13 16:59:16 -07:00
Eric Fischer
f16f1297bd Import new translations 2009-07-13 15:45:49 -07:00
Andrew Stadler
ded3c915d8 Add folders to AccountFolderList
* Scan folders and write into child cursors
* Clicking a folder takes you to MessageList
* Remove most links to FolderMessageList (nearly dead!)
* Repair 1-account startup behavior (takes you directly to inbox)
* Cleanup a few basic things like context menus & refresh

TODO: Magic mailbox section at the top
TODO: As always, better linkage to sync engine(s)
TODO: Menus, context menus, etc.
TODO: Proper handling of expandable list - accounts should stay open?
2009-07-10 16:46:51 -07:00
Andrew Stadler
72dce73390 Convert Accounts to AccountFolderList
* Move relevant sources & resources to new name
* Convert from ListView to ExpandableListView
* No children yet - selecting account simply jumps to FML (temp)
* No other change to functionality (e.g. no menu changes yet)
2009-07-09 12:33:09 -07:00
Andrew Stadler
b55bfc96f4 Enable multi-selection actions
* Toggle small pane with multi-select action buttons
* Implement multi-read/unread
* Implement multi-favorites (stars)
* Implement multi-delete

TODO: menu items when there are selected items
2009-07-08 16:09:45 -07:00
Mihai Preda
e8d58c01ec Implement efficient Address pack/unpack and unit-test it.
Also unit-test legacy pack/unpack.
2009-07-08 12:07:58 -07:00
Andrew Stadler
432d1ec3ed Add custom item view to MessageList
* Stores per-message metadata
* Fix a number of todo's in MessageList
* Clicking on checkbox toggles state, updates checked list
* clicking on star toggles favorite state

To do:  When one or more messages are checked, we should slide in a
panel with action buttons.
2009-07-07 13:43:24 -07:00
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