Commit Graph

28 Commits

Author SHA1 Message Date
Yu Ping Hu 9ae81e2af0 Move system folder string resources to emailcommon.
This permits us to move shared code for looking up system
folder names to emailcommon, which is also in this change.

Also renames emailcommon2 to emailcommon.

This is part of a multi-project submit with
I4a071a07c3e33aaa4ea404eb66a8db1eabc9ef0e and
I5746c0353783f9b29d52d6540472588c6542a6a2.

Bug: 8383232

Change-Id: I6c6eec4f1bcf2abd54c1ed05da1add8d894ee403
2013-03-19 19:45:52 -07:00
Yu Ping Hu 8e2c4056ca Clean up dead code. Should be a no-op for functionality.
Also includes a fix for saving a draft that's already
been saved (used to create a new one).

The following were unused:
- accountIdAddToField
- mailboxIdAddToField
- uisendmail
- uisavedraft
- uiupdatedraft
- uisenddraft

Deleting those also allows us to remove the translation
from the Bundle used by calls to the ContentValues used by
update (since the update paths are now gone).

Change-Id: I87f2875e3272177a128a8ff65541e51b1f2d05fc
2013-03-14 14:40:39 -07:00
Scott Kennedy b34608228f Move notifications to UnifiedEmail
This involves redoing the persistence model, to split general,
account, and folder settings into separate SharedPreference stores.

It also requires some preferences to be moved into UnifiedEmail.

Depends on Ibe2e3f93ec164370535ffc5f5b2409544cc8d36d (UnifiedEmail)

Change-Id: Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
2013-02-08 09:48:22 -08:00
Marc Blank e714bb9d15 Convert authorities, intents, and account manager types
* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
2012-08-31 23:26:36 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank e2166f7548 Add totalCount to Mailbox; send to UIProvider
Change-Id: If01868eb27a97540683f25148f32b8c41ae59c17
2012-03-10 20:15:58 -08:00
Marc Blank ebb79619e8 Move account delete logic to EmailProvider
* This functionality had to move away from Controller

Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
2012-03-09 12:59:21 -08:00
Marc Blank 06a382f26f Fix up delete to handle trash/drafts deletions
* Also, while we're here, create default "last touched time" for drafts and
  sent so that they appear in the initial recent list

Change-Id: Ie2fe20b34625b5616dac5581f9bbd015f52a82bc
2012-03-08 14:36:26 -08:00
Marc Blank bf5caf97c5 Notify by mailbox, rather than account
* Update EmailProvider, removing two no-longer-used columns in Account and
  Mailbox

Change-Id: Ie0f10eb0ca315d73e82be968f7760a51a239ba3f
2012-02-24 14:51:59 -08:00
Marc Blank 1dc7772d43 Support syncStatus and lastSyncResult in EmailProvider
* Also, trigger a sync on refreshUri

Change-Id: Ia8dee593decfc2101873071ad64fcc3fd1fd5f23
2012-02-22 11:50:18 -08:00
Marc Blank 1aba472486 Remove unneeded logging from EmailProvider
Change-Id: I229c3044566b6067efb7a8a06c10f41dbea3ad5a
2011-08-19 16:56:29 -07:00
Ben Komalo 37a7469716 Hide sync options and search icon when appropriate
- hide sync options for mailboxes that aren't actually syncable
- hide search icon for any mailboxes that don't have any server
counterparts

Bug: 5086134
Change-Id: I60d5e5d1225a946464c5ea273c7d4b9299f433e5
2011-08-07 15:40:12 -07:00
Ben Komalo cb1d65c478 Fix mailbox finding and unit tests.
We seemed to not properly fallback to querying the database if the cache
did not contain a mailbox of a specific type. We may want to consider
caching mailboxes related to PIM data, but for now this is a quick fix.

Also fixes unit tests.

Bug: 5019661
Change-Id: Idcac0a6f15aa7f174890ae586f478fbb8f6e05b7
2011-07-25 16:51:47 -07:00
Ben Komalo 81a153463b Remove "Move" action on POP.
Bug: 5010614
Change-Id: If0a94840e9dc104566ba39d2e3240883dab5bba0
2011-07-20 13:21:06 -07:00
Ben Komalo e71a19a523 Build default mailboxes for POP3
Bug: 4580535
Change-Id: Ic800eed387d3e9e64e95cce691d13d98b4a48045
2011-07-17 17:48:31 -07:00
Marc Blank 0b8e04c84d More Store cleanup
Change-Id: I8f542175b4468c7a320322a57bfdaf19a7320165
2011-06-29 15:22:05 -07:00
Marc Blank 9a01353f14 New search implementation for IMAP in MessagingController
* Add protocolSearchInfo column to Message table; this can be used
  to store information related to search results.  For IMAP, we
  store the serverId of the mailbox that the message lives in on
  the server
* Add upgrade code for this column
* Change MessagingController to use the proper serverId for remote
  operations, depending on whether the Message is a search result
  or not
* Fix some smaller issues with earlier code

Change-Id: I0c7f1d89a4659b95701d02646c0e8426680e2f6a
2011-06-23 22:02:00 -07:00
Marc Blank d12f78d6ba Fix cursor-related errors:
1) Have CachedCursor implement CrossProcessCursor; still need to
  figure out how this ever worked
2) Close cursor used internally in findMailboxOfType

Bug: 4869024
Change-Id: Id20d37b7b83e133aa4d5fe9293a42ae217024f01
2011-06-22 10:59:06 -07:00
Marc Blank 6e418aa41a Improve EmailContent caching...
* Guarantee that up to 16 Account (with HostAuths), and Policy rows
  are always cached.  Also, 6 commonly used Mailboxes per Account
  (Inbox, Outbox, Drafts, Sent, Trash, and Search)
* Precache these rows when EmailProvider starts up
* Ensure that newly added, precachable rows are cached when created
* Clean up some inefficient/wrong caching code
* Fix a commonly called method in NotificationManager in which we
  load a single Mailbox row using selection vs withAppendedId
* Confirm that we don't read from the database in typical use and
  heavy message loading
* Add a special URI for finding mailbox by type (using the cache)
* Add special-case code for EmailContent.count(Account.CONTENT_URI)
  which is used in a number of places (including on the UI thread)
  and whose value is easily determined
* Add a special URI to get the default account id
* Confirm that all unit tests work

The goal here is to be able to load all Account, HostAuth, Policy,
and Mailbox objects (by id) without worrying about disk access.
There will still be a single disk read for uncommon Mailbox reads,
but this should be considered acceptable.

Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210
TODO: Unit tests
2011-06-21 21:39:19 -07:00
Marc Blank ed1dc9ee72 Support "Load More" for IMAP search
Change-Id: I47e5fd1fab421026ee52af72ba56338c69e9b467
2011-06-17 15:43:18 -07:00
Marc Blank 627bc6ed57 First implementation of IMAP search
* Broke up synchronizeMailboxGeneric into three pieces; it's still
  horrible, but this at least stops my eyes from bleeding
* Remove unused method/tests from Folder interface

Change-Id: Ib4d979536be657137cf70ca535cf429d707be41b
2011-06-16 20:26:52 -07:00
Todd Kennedy 9dcb72e1ec Add "lastTouchedTime" column to the mailbox table
The last touched time will track the last time a message within that mailbox
was read. This will be used for the recent list.

Change-Id: I97a5fda52fd09b416fc3278a11a87b807da05c9c
2011-06-03 08:51:25 -07:00
Todd Kennedy 44f5cd67c9 Remove widget views
The new widget UX allows for a single display mode for the widget. This can
be configured when the widget is added or at a later time during widget
re-configuration.

We don't have the configuration activity (yet). We first need to restructure
the widget to take a single account / mailbox combination. Hooking up the
configuration activity will occur in a future CL.

Change-Id: I38a5796c44938a6abd0d2bb50ac77241cc86a497
2011-06-01 10:46:32 -07:00
Makoto Onuki b36ac01792 Changes for NO_XXX
- Added Message.NO_MESSAGE
- Renamed PSEUDO_ACCOUNT_ID_NONE to NO_ACCOUNT
- Removed PARENT_KEY_NONE and use NO_MAILBOX instead
- For starters, cleaned up the UI controllers to use them.

Change-Id: I6cfd87ece2fced8e9f7c76d034c4d1dbf9e4db10
2011-05-17 14:36:00 -07:00
Makoto Onuki 54c91f00d7 Use IllegalArgumentException, not InvalidParameterException
Because IllegalArgumentException is the standard one.

Change-Id: Ib4d0bfa88a3d4218148a7cb248d9baa2124a72ba
2011-05-16 17:48:46 -07:00
Ben Komalo e0bb7e7909 Make Mailbox parcelable
Also fix unit tests

Change-Id: I5f64f53b278b7bc27053d831760b155532a14e33
2011-05-13 18:35:08 -07:00
Ben Komalo 53ea83ebf9 Move Mailbox to top level class.
No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
2011-05-13 17:42:02 -07:00