Commit Graph

188 Commits

Author SHA1 Message Date
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
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
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
Ben Komalo
e71a19a523 Build default mailboxes for POP3
Bug: 4580535
Change-Id: Ic800eed387d3e9e64e95cce691d13d98b4a48045
2011-07-17 17:48:31 -07:00
Jorge Lugo
abec4e631c Merge "Prevent account flip flopping from compose" 2011-07-13 16:35:50 -07:00
Ben Komalo
4de538be2d Prevent account flip flopping from compose
There were two issues:
- the default account ID from the provider wasn't consistent: it was
using a snapshot from the cached data but that simply returns a Map, and
the values aren't guaranteed to be sorted (and indeed I saw that the
order was different on consecutive calls!)
- hitting app up from Compose always just kicked you out to the inbox
for the default account, but it probably should have used the account of
the compose screen, since it can be specified in the Intent

Bug: 5012008
Change-Id: Ic9a753b261e047790453bc1a9417bc0c6d2f87f9
2011-07-13 14:46:50 -07:00
Marc Blank
190b2fb8a1 Add support for TrafficStats; use with IMAP/POP3
* All IMAP/POP3 functionality uses TrafficStats except for
  attachment loading (subsequenc CL)

Bug: 4988322

Change-Id: I91d826e0f7151a2101b642c868ab8c37e9660332
2011-07-12 11:28:58 -07:00
Ben Komalo
f4f10a3fdf Make client certificate requests optional.
This prevents things from always failing if the server requires a client
SSL certificate.

Note that the solution used to determine if a certificate request was
made for a given request is approximate; it is timestamp based and can
theoretically give a false positive. In practice, this is very unlikely,
since another cert request had to have happened around the same time,
AND the response must be a 401/403.

Change-Id: Ieb77cf91db3bd52ba4adf1fb07357fef7e204ba5
2011-07-11 09:28:33 -07:00
Ben Komalo
025d29fd4b Fix some missed account setup flags.
There were two places where account flags were being set on setup: one
was in manual setup when the user selected the account type
(pop/imap/eas), and another was when it was automatically determined
from XML. The two paths were inconsistent and one was setting bits like
SUPPORTS_SEARCH but the other wasn't.

This fixes being able to search in IMAP

Bug: 5011932
Change-Id: I50eada7485aaef4e2a85d25fa7eb9ac7ab03093a
2011-07-10 18:26:15 -07:00
Ben Komalo
7891106a7d Write reply/forward flags on Controller.sendMessage
- also fix some mixups with the actual icon states

Bug: 4947145
Change-Id: Iec1bbfc46ac956a6bf050e4fb162b94ea3c6b316
2011-07-06 18:10:16 -04:00
Makoto Onuki
745b33b8ff Fix all NoSuchMethodErrors
Change-Id: I05adf2b99c819d6aa2d3b52c52a8c655d9307337
2011-07-01 12:44:27 -07:00
Marc Blank
2bdf7ee0f0 Delete orphaned mailboxes/messages/policies at provider startup
Bug: 4972132

Change-Id: Icc756a9e28b77de052261903089b040d229e7b5d
2011-07-01 09:21:09 -07:00
Makoto Onuki
8de5bda815 Close cursor properly.
Also, don't issue separate query()s for each recent mailbox.

Bug 4977956

Change-Id: I3ccd437a7efd5c3599c4a1952ba091a7b3b815bf
2011-06-29 19:21:14 -07:00
Marc Blank
0b8e04c84d More Store cleanup
Change-Id: I8f542175b4468c7a320322a57bfdaf19a7320165
2011-06-29 15:22:05 -07:00
Marc Blank
244d306ebb Remove more useless code
* Strike another blow for sanity!

Change-Id: Id95b441f9577abda66f04113793d6b1c60500ebe
2011-06-29 14:07:25 -07:00
Marc Blank
77160c8c08 Merge "Don't cache ImapFolders" 2011-06-29 13:34:44 -07:00
Marc Blank
2720a818d5 Don't cache ImapFolders
* ImapFolder is currently very unsafe for use by multiple threads,
  causing, among other things, the referenced bug
* Since ImapFolder is very lightweight, there's no particularly good
  reason to be caching them anyway
* Rename isOpenForTest to isOpen

Bug: 4972084
Change-Id: I2bf17b9cfc8549a222e991f3e59abfd00a4d3afd
2011-06-29 13:02:55 -07:00
Makoto Onuki
50d934360d Fix the "onPostExecute executed even when cancelled" issue
Renamed onPostExecute to onSuccess and made sure it won't called
if a task is cancelled in time.

Also removed isCancelled().  To implement it right we should make sure
that onPostExecute() isn't finished when setting mCancelled, but it's a bit
of a pain to implement right, and we don't really have to use it.

Change-Id: I3a0baf504506ffc4952a5553f7098a8415842fa3
2011-06-29 10:22:38 -07:00
Makoto Onuki
4a893e60b4 Switch to EmailAsyncTask
Also remove the isCancelled test in onPostExecute, where it should
never return true.

Change-Id: Ica2b07db22d73769c2ead5f232f4890bd3bb87da
2011-06-29 09:50:52 -07:00
Makoto Onuki
6b968c1dce Introducing DelayedOperations
This helps post runnable to the handler and cancel pending runnables
at once.

It'll be used for delay-call methods that initiate a fragment transaction,
and cancel then in onSaveInstanceState().

Change-Id: Ib8bdb0e676e756854ab067a27e5e0f397219a4b4
2011-06-27 17:00:50 -07:00
Ben Komalo
ca22a51a9c Merge "Replace details dialog with expando subheader" 2011-06-27 09:58:30 -07:00
Makoto Onuki
178e2930e7 Supress the usual mime warnings from mime4j
Supress "Body part ended prematurely" and "Unexpected end of headers detected".
I believe these happens because we feed partial messages to the parser.

We've kept these logs only "just in case", but I don't think it's ever been
usueful...

Change-Id: I29e5e48abf71612eed656ce6569246caf8a320bc
2011-06-26 14:02:52 -07:00
Ben Komalo
5cba9c10ac Replace details dialog with expando subheader
Change-Id: I7b0f63b7b5ce7172ac32b8c00891005b9f2e28ee
2011-06-25 16:34:37 -07:00
Makoto Onuki
d8a2e33998 Add debug log to investigate bug 4905749
Change-Id: I1cfe12b0150490ec08caa02332bcca88521ff5fd
2011-06-24 18:44:31 -07:00
Ben Komalo
472d75f1b4 Merge "Misc cleanups and avoid logging PII" 2011-06-24 09:54:38 -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
Ben Komalo
877b9070fa Misc cleanups and avoid logging PII
Change-Id: I9f906dabe0dd00a434ff88878f0639c835b2e2a7
2011-06-23 19:41:47 -07:00