Commit Graph

212 Commits

Author SHA1 Message Date
Paul Westbrook 7a7508c641 Build against the ICS SDK
Change-Id: Ib6429d43420b1382c8dfc81d30568c62cbbf92b6
2012-04-27 12:40:13 -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 55d0e821ea Report search result total to UI
Change-Id: Ic88e7594b98548a96c8c6f96d2f8a585e539f520
2012-03-09 14:04:49 -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 70bbe5ec3c Add columns to Attachment for UIProvider use
Change-Id: I7f85431f409dbd6a5bd6d111b18d1fc89c00b9b2
2012-03-07 13:10:23 -08:00
Marc Blank 54c26f9d32 Improve hashCode() for Address
Change-Id: Ifa15e57d8b7ff83511aab853dc0a5da1eb14892d
2012-03-04 17:31:38 -08:00
Marc Blank 0ba6b91842 Give Address a hashCode() method
Bug: 1858468

Change-Id: Ic91292c7ab7cf8b42cdecd54fa2d4faf91b2ff4d
2012-03-02 15:18:57 -08:00
Marc Blank 9a5e2a798e Fix clearing of mailbox notifications
Change-Id: Ieb98a8908ec067229dd449790da55085585ef17b
2012-02-26 12:52:57 -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 272d22d641 Add last sync result definitions to EmailContent
Change-Id: I43ea9a9ed3e1982610443887298d54654deb01b8
2012-02-23 10:28:36 -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 4f813fb129 Convert POP3 to service
* Remove MessagingController and (almost all of) MailService

Change-Id: I8953b58b237de6a71fda770f1727bd94081fec55
2012-02-16 10:27:00 -08:00
Marc Blank c84467afe1 Start of IMAP conversion to Service architecture
* Handle startSync and loadMore
* Use SyncManager rather than MailService for periodic sync
  and upload sync
* First of many CL's to disentangle sync from UI
* Note that the large majority of this CL is a refactoring
  of IMAP specific code out of MessagingController and into
  ImapService; MessagingController will eventually be
  removed entirely from the app, as will much of Controller

Change-Id: I13546d0694479b33cf93c25920dedc1d38227f6c
2012-02-13 11:04:56 -08:00
Marc Blank 87d7a60417 Handle update of draft
Change-Id: I15c2b2b85afeff19e4ae7520c36a6119ab1e5cca
2012-02-03 09:51:07 -08:00
Mindy Pereira b057793bf2 Remove second copy of apache code. Depend on unified email for these classes.
Change-Id: Ibe3e18b8e38389bff7f0e3a3479b660b97f94c7e
2012-01-30 12:50:04 -08:00
Marc Blank 36ed276f7a Store UI-friendly addresses in EmailProvider database
* Currently, we store a generally incompatible packed string format
  for to, from, bcc, cc, and reply-to columns
* Change this to UI-compatible, comma-separated RFC822 strings
* Upgrade database to use new format

Change-Id: I42c01d72b49531c4324d3956edf5ff362d5c9120
2012-01-17 13:11:45 -08:00
Marc Blank fd81e19779 Don't save Policy with Account
Change-Id: Ib3601daee8780640a07db573f623e99279c9f9b1
2011-11-21 13:04:26 -08:00
Andy Huang f20f3e216f am 56d6f4a6: Merge "Style cleanup in email message header to make it more like Gmail" into ics-mr1
* commit '56d6f4a6f13b53051d17579c54cebe0372515f3d':
  Style cleanup in email message header to make it more like Gmail
2011-11-03 05:17:42 +00:00
Andy Huang 358a815701 Style cleanup in email message header to make it more like Gmail
Linkify email addresses in expanded message details
Remove divider line in upper header on phone
Embolden sender name
Twiddle expanded details line spacing and padding to match Gmail
Add space char to collapsed details recipient enumerator (comma)

Bug: 5520692
Bug: 5520787
Change-Id: Iad4a265168d111aa01654a33a9a14f7968fc3181
2011-11-02 15:50:00 -07:00
Marc Blank 4317ff162e am dea198bb: Add utility to determine if account can\'t auto-sync due to roaming
* commit 'dea198bb041754745c3b1522671fd31a79c7168c':
  Add utility to determine if account can't auto-sync due to roaming
2011-11-02 19:00:58 +00:00
Mindy Pereira af9e4ef82e am ddcb0db4: Merge "Revert "Add utility to determine if account can\'t auto-sync due to roaming"" into ics-mr1
* commit 'ddcb0db429df71356360b2224b56b01b7051c34c':
  Revert "Add utility to determine if account can't auto-sync due to roaming"
2011-11-02 17:50:05 +00:00
Marc Blank 6638627595 am 483f4927: Merge "Add utility to determine if account can\'t auto-sync due to roaming" into ics-mr1
* commit '483f49274e0aed3d4158ac6c2ba9fd693acb2809':
  Add utility to determine if account can't auto-sync due to roaming
2011-11-02 17:31:48 +00:00
Marc Blank dea198bb04 Add utility to determine if account can't auto-sync due to roaming
* We need to call this out to the user (a surprised user is an
  unhappy user)
* Required for fix to bug referenced below

Bug: 5533550
Change-Id: I64a870a703de7e02ce882aefc3636a1668021eb8
2011-11-02 08:59:36 -07:00
Mindy Pereira ea4adf0c6b Revert "Add utility to determine if account can't auto-sync due to roaming"
This reverts commit 95abeed64a
2011-11-01 17:17:06 -07:00
Marc Blank 95abeed64a Add utility to determine if account can't auto-sync due to roaming
* We need to call this out to the user (a surprised user is an
  unhappy user)
* Required for fix to bug referenced below

Bug: 5533550
Change-Id: I7da337057b9b28300ddd485283920e12c1ae53da
2011-11-01 14:11:43 -07:00
Marc Blank 2736c1a11c Rewrite of security policy handling and service code
* Remove PolicyService APIs policiesRequired, policiesUpdated,
  isSupported, clearUnsupportedPolicies, and isActiveAdmin
* Add PolicyService API setAccountPolicy, which is the sole
  method by which security policies are promulgated
* Add protocolPoliciesEnabled and protocolPoliciesUnsupported
  to the Policy class; these are packed, localized strings
  indicating policies that the protocol itself have enabled
  and/or cannot support (i.e. these are policies that are
  unknown to the DPM, e.g. don't load attachments)
* Differentiate in security notifications between three kinds
  of policy changes - changes that don't require user
  intervention (e.g. reducing requirements), changes that
  require user intervention (the legacy notification), and
  changes that make the account unsyncable (e.g. the server
  adding an unsupportable policy). Handle all possible policy
  changes cleanly.
* Make security notifications per account (with multiple
  accounts, notifications would get arbitrarily munged)
* Expose ALL enforced policies via the account settings
  screen in two categories: policies enforced (including
  both policies enforced by the DPM and policies enforced
  by the protocol) and policies unsupported (note that these
  can only be seen if policies are changed after an account
  is created; we do not allow the creation of an account
  when any required policies are unsupported).  Add a
  button that forces a sync attempt, for accounts that
  are locked out, but whose policies have changed on
  the server (this would otherwise require a reboot).
* Updated unit tests

Bug: 5398682
Bug: 5393724
Bug: 5379682
Change-Id: I4a3df823913a809874ed959d228177f0fc799281
2011-10-25 10:32:34 -07:00
Marc Blank 0ff0e155c5 Fix findExistingAccount to treat underscore properly
Bug: 2318959
Change-Id: Ia39ed29084dc8111c61ff552fa65519789b7c23a
2011-10-20 18:41:26 -07:00
Ben Komalo 223267f701 Merge "Fix per account starred mailboxes." 2011-10-12 19:45:12 -07:00
Ben Komalo 513486cfb5 Fix per account starred mailboxes.
We always switched to combined view when we tapped "Starred" in a
mailbox list. This was confusing since tapping to show the mailbox list
will take you to the mailbox list for the combined view, even if there's
only one account on the device! Other confusing things happened like
showing coloured account chips, even if there's only one account.

This fixes it so that we pass the account ID when building the
selection. Lots of wiring to make it happen, but very little change
overall.

Bug: 5388326
Change-Id: I1fe52f211cceca0c1b26581e200f3c7adcd0734a
2011-10-12 19:44:39 -07:00
Ben Komalo 4d3f3f3ab9 Fix hostname verifier for Exchange connections.
When the socketfactory init code was moved, I forgot to re-add in the check
to skip hostname verification. This made "Trust all SSL certificates"
checkbox useless.

Bug: 5450563
Change-Id: Ie4cba749aaf8c0fd9f9c43f09ebf354c6600d4f0
2011-10-12 13:41:59 -07:00
Marc Blank 71c9683087 Improve policy logging
Change-Id: I023b7c5302ea00ab77edd697009fb00544951a80
2011-09-30 15:00:25 -07:00
Marc Blank b169192c8a Update account object in Policy#setAccountPolicy
* We weren't updating the account object passed in to setAccountPolicy,
  which is problematic if the object is cached and used subsequently
  in the code (it would have stale policy values)

Bug: 5245056

Change-Id: I279570dfd66c4a65d751f73e2e56578be186d339
2011-09-06 10:46:49 -07:00
Marc Blank c28fdfeaad Throw RuntimeExceptions when PolicyService calls fail
* Rather than returning false, which can cause unexpected
  results, e.g. locking out an account until reboot
* Partial fix for the referenced bug (there might be other
  causes)

Bug: 5221119
Change-Id: I5b47093a3411deb6995624887197297323db0d2d
2011-08-29 16:18:50 -07:00
Marc Blank 185fd5b3b8 Restore return statement erroneously deleted earlier
* Screwed up in I1f6e31bfd2e7c32bdd7886e54b02fd4640a96e6f

Bug: 5205488
Bug: 5203883
Change-Id: I619135bd5dd8359b4b0573316482356a9b517865
2011-08-24 17:14:07 -07:00
Marc Blank 1aba472486 Remove unneeded logging from EmailProvider
Change-Id: I229c3044566b6067efb7a8a06c10f41dbea3ad5a
2011-08-19 16:56:29 -07:00
Marc Blank 8b755f600c Make sure reconcileAccounts in AccountService is synchronous
* This is important so that callers can know that reconciliation
  is complete.

Bug: 5189766
Change-Id: I4fbbaa6506042f975e7ad4e828fe8399c4d4a366
2011-08-19 15:27:00 -07:00
Jorge Lugo 9ca5751db0 Merge "Add conversationId field to Message" 2011-08-11 17:45:52 -07:00
Jorge Lugo c01a783cd6 Add conversationId field to Message
So that exchange can pass along conversationId when
syncing. It's not persisted in the database.

Change-Id: I53d68b27b292b0db0fd808e0deeb28751361f1f4
2011-08-11 17:07:50 -07:00
Marc Blank a9f1631fb8 Remove STOPSHIPs in Email/Emailcommon
Bug: 5142183
Change-Id: I1f6e31bfd2e7c32bdd7886e54b02fd4640a96e6f
2011-08-10 16:43:20 -07:00
Ben Komalo 0e6a521747 Move IntentUtils to emailcommon.
This is needed so Exchange can fire up Email activities.
No change other than the move.

Bug: 5122497
Change-Id: I6ee3f61654745fafd444314ecf75eb8ae6bbd01d
2011-08-08 14:39:19 -07:00
Ben Komalo 03cb4a2135 Merge "Hide sync options and search icon when appropriate" 2011-08-07 15:44:30 -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 994343b14b Fix SSL certificate selection for exchange.
- Since the Email and Exchange processes do not share UID, we need to
ensure the call to the KeyChain to request the certificate happens in
the Exchange process
- Misc UI fixes so it's not so ugly

Bug: 5117682
Change-Id: If80698850902e0178eb0998493b4cf4b89e2a15c
2011-08-05 11:28:52 -07:00
Marc Blank 8ba8c1648c Prevent leaking ServiceConnection when process/threads killed
Change-Id: Id5d85fbdd0d044a59cc61748432e3f714264bcd5
2011-08-03 15:40:16 -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
Marc Blank aca9426581 Remove NotificationService; use Account columns for data storage
Bug: 5023662
Change-Id: I84df3b474dd6320327851003af985144cc16348e
2011-07-19 18:19:59 -07:00
Marc Blank 4e4aba9ebc Clean up account reconciliation
* Move AccountReconciler to the Email app (from EmailCommon)
* Ensure that Controller.deleteAccountSync() performs ALL actions
  needed to clean up after an account deletion (delete attachment
  files, reset policies, refresh the UI, etc.)
* Add reconcileAccounts() API to AccountService
* Remove accountDeleted() and restoreAccountsIfNeede() from the
  AccountService API
* Remove unused callback

Bug: 4883073
Bug: 4767084

Change-Id: I43ffaf009db1a6f306bb0f2a74fb4dd3b2c4b966
2011-07-19 10:31:33 -07:00