Commit Graph

871 Commits

Author SHA1 Message Date
Anthony Lee 0e49862711 Introduction of DownloadQueue and associated tests.
Also a bit of cleanup around log tags and DownloadRequest.

Change-Id: I33221f099ed691e5258e1741cf0a63381404f520
2014-05-12 13:50:50 -07:00
Tony Mantler 2f288864b6 Fetch email bodies using ContentResolver#openInputStream
This brings us further along the path to storing email bodies
outside of the database.

Change-Id: I96296114ade0d561df724878ed92999306bcd176
2014-05-08 15:50:57 -07:00
Tony Mantler 9a80ffce14 Handle attachment filenames with % characters
b/14571903

Change-Id: I3296bebfb4c6902750c68c9d3fb79ce644dbb137
2014-05-06 10:26:45 -07:00
Jay Shrauner 2fc13087e7 Parse abbreviated date fields
Add support for abbreviated dates with no timestamp (eg, "2009-01-02") to
parseEmailDateTimeToMillis.

Bug:14496986
Change-Id: Ifc77cb75fd9e23536b48c8f6ecefc0e2e8f1cc2c
2014-05-02 16:17:17 -07:00
Jay Shrauner 988d2b6e85 Fix Exchange crash when parsing abbreviated dates
Detect fully qualified and abbreviated date/time stamps in parseDateTime.
Previously parsed fully qualified forms like 20090211T180303Z; now also
parses 20090211.

Bug:14279251
Change-Id: I9a99ae16a5c1fe87b977fbebdba307baa653d539
2014-04-30 09:53:00 -07:00
Tony Mantler 3c73a04bec Continue purging the unused reply parts
Change-Id: I47b5bbe50ba36e68ad7ba80647f401b992660ba1
2014-04-18 14:04:23 -07:00
Tony Mantler f0db9ce9ab Clean up LegacyConversions
Change-Id: I9cb9bf8a08663004a497af9f52e3ab0647bd2168
2014-04-18 13:36:18 -07:00
Tony Mantler 845db97119 Fix some missed class renames
Change-Id: I82c9e21049096525cc55fa57e5cc307844014832
2014-04-15 11:50:20 -07:00
Tony Mantler 3dd85723a1 Cleanup in EmailContent
Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
2014-04-14 12:54:39 -07:00
Tony Mantler c83366c887 Fix some crashes and misbehavior with account settings screens
b/13954490

Change-Id: Ic81b342495a46573cb1fe78cad1f4888fffc4ae8
2014-04-10 15:28:15 -07:00
James Lemieux 5057d6dffb Replying to a Message with an encoded email address shows the encoded address in the to field.
b/11658428

As per Yu Ping's advice, we alter the storage of all email addresses (from, to, cc, bcc and
replyto) to be stored in *decoded* format within our database. This makes them both human
readable when inspecting the database manually and alleviates the need to repeatedly decode
them before they are displayed anywhere in our UI layers.

As part of this bugfix, I resurrected several tests related to the LegacyConversions class out of
LegacyConversionsTests and into a new (not Suppressed) test class: LegacyConversionsTest

Change-Id: Ie2e3264646e25c08c4ba74f60b3e1090c052e6c6
2014-03-27 23:25:53 +00:00
Tony Mantler 38f9991634 Fix IMAP message upsync to include attachments.
b/13138456

Change-Id: If16b619a650c640a37cb4563750a6327a5e601e6
(cherry picked from commit 0c8696c2eb)
2014-03-27 21:23:32 +00:00
Tony Mantler 452744474a Fix broken tests and remove dead code
Change-Id: I3ae31c604c86641622f997915dc7d86bf2c662a2
2014-03-18 13:57:11 -07:00
Tony Mantler 951eb080f9 Fix tests
b/13244976

Change-Id: I8aa00e32b1a2155242ed30a61b27db16fe15b605
2014-02-28 14:21:41 -08:00
Tony Mantler 76472ae40c Merge setup fragments under a single activity
Change-Id: I10cf8bb9f6bc1a26ea97ae664f0196ae9e9493b5
2014-02-26 13:47:41 -08:00
Tony Mantler c5685ba600 Fix tests
Change-Id: I89370919dd5a8a129ea946f2d3429f0d4a056eb6
2014-02-21 11:43:19 -08:00
Brett Chabot 5f72d21df9 Add a placeholder flaky test.
For fun and profit.

Change-Id: Id9feb6bc89a66143f1220053fdf0e3fd25097229
2014-02-20 21:59:50 -08:00
Brett Chabot 695c77e526 Convert Email tests to use android-support-tests
Change-Id: I173afa352504757e84f5cc48dca8b493957ff6a1
2014-02-20 21:03:07 -08:00
Jerry Xie 3555dc03bf Add @SmallTest annotation to test classes so they get run in continuous
Change-Id: Ieb0e3af146a6668c813ff16a718221eae61e8e01
2014-02-19 20:13:59 -08:00
Martin Hibdon 10c7412555 Fix some broken tests
b/13085182
You can't look up emailServiceInfo for smtp, we don't store that
in services.xml. The thing is, if we're using outgoing settings,
we're always using smtp, which allows oauth.

Change-Id: I5c6032e8d5020ba83fa1c803666b83f134f87f75
2014-02-19 16:17:43 -08:00
Tony Mantler 822f17d6c1 Merge "Mark otherwise unused method as @VisibleForTesting" into ub-mail-master 2014-02-19 00:11:01 +00:00
Tony Mantler feeb1e3ada Mark otherwise unused method as @VisibleForTesting
Also fix spelling cancellAllInterrupt -> cancelAllInterrupt

b/13082964

Change-Id: I2fef949bb351a536fdd0d7058b3df2b03eecb39e
2014-02-18 15:59:03 -08:00
Martin Hibdon ad94ecc471 Fix account setup test
Change-Id: I7c1b785e5aa29cc7f47920d857441f1a09f05b21
2014-02-18 12:25:41 -08:00
Anthony Lee b4bf6ba6a3 comment out broken unit tests in Email
Change-Id: I74584344e31c38df4a57ae3d65a01a5bdd2c5a46
2014-02-07 14:19:21 -08:00
James Lemieux 1fa303478c Eliminate redundant methods in Address class
THIS DOES NOT CHANGE ANY EXISTING FUNCTIONALITY.

Address.pack() has been removed and all calls replaced with its synonym Address.toHeader().
Address.unpack() has been renamed to Address.fromHeader() to follow the new naming convention.

In days of yore, pack() and toHeader() used to do different things. Now they are identical and
thus one is superfluous. We have standardized on toHeader() and fromHeader().

Change-Id: Iac91c966eb6c1477f8dba0dd2ae01c84b359e539
2014-01-22 16:15:57 -08:00
Tony Mantler 7e4daecc9a Merge AccountSetupNames and AccountSetupOptions
Change-Id: I5946e90e56b1fc725522d41e2e33d8125900a871
2014-01-16 14:18:58 -08:00
Tony Mantler 877825cfb0 Deduplicate Address class
Change-Id: I50a6a61c78935a7ecfb56be0a5eaed644dea9ed0
2014-01-08 11:17:20 -08:00
Jerry Xie 7037a0bd3d Disable, suppress, remove broken and obsolete Email tests
Change-Id: Ia4dcba1c6966f23dd2a15e69324b7345aed8f944
2013-12-16 18:18:51 -08:00
Tony Mantler 9c8c471f97 Convert SetupData into a retained fragment
This will keep it from being recreated quite as much while off-thread tasks are possibly mutating it.

Change-Id: Ic9873489906339c33a76b8a600c0fc28016debc4
2013-12-09 12:02:12 -08:00
Jerry Xie d241290f0b Add makefile for EmailTests
Change-Id: Ic441b5cea9efd0b714a00a69c5b8483ddd11fafa
2013-12-06 17:33:36 -08:00
Jerry Xie 17d3a29c9d Get Email units to compile
Change-Id: I171a0e2421c5006d9862ad94f886932146547020
2013-12-05 11:11:21 -08:00
Yu Ping Hu bc8bc050b0 During upgrade, ignore protocols whose strings don't change.
Copied from https://googleplex-android-review.googlesource.com/#/c/389215/
in order to submit for ur10, also made a minor change to early out when
we know it's a no-op.

Bug: 11258856
Change-Id: I28415e97225a216c16abb6ad7c48a860c5370173
2013-11-14 18:19:12 -08:00
Tony Mantler 2ed113c713 Foreign characters may be letters and digits, but they're not allowed in Uri/Url schemes
b/11356390

Change-Id: Ic510607ab5f671e3f3f474ea3c2f4af7e9966cb1
2013-10-31 16:39:03 -07:00
Andrew Sapperstein 5dcb447c04 Moved some stuff from Email to Unified.
b/10542802.

Change-Id: I9623ce85cae6f67ec647e1712e8c392a35311171
2013-08-29 17:41:26 -07:00
Tony Mantler c6953b7755 Reimplement QuickResponse support
b/8622751

Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50
2013-08-16 14:08:54 -07:00
Yu Ping Hu afe097f318 Simplify account reconciliation.
- Rather than handle by type, do them all at once.
- Simplify when reconciliation happens.

Bug: 9056861

Change-Id: If264678c82c63090246ef8ff857c8e46f6672c85
2013-07-26 16:06:14 -07:00
Yu Ping Hu aa0ca16a27 Remove references to account mailbox.
Exchange implementation no longer uses them.

Change-Id: I221a914f2428c0c7989f79392ca82f7a8f4b1c52
2013-06-17 19:51:47 -07:00
Scott Kennedy 560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Andrew Sapperstein 6be411edd0 Refactoring to support eml viewer in UnifiedEmail.
Moved two files out of Email into UnifiedEmail and
removed their dependencies on EmailContent. As a result,
those classes now return the data directly via a data only
class.

Change-Id: Iaf0618dd6879c9dc2a41943d3d15428904b65768
2013-06-04 15:37:40 -07:00
Jack Bates 4fd97a3050 Fix SMTP RFC violation for better interoperability
Space after colon violates RFC 5321 (and RFC 821): "Since it has been a common
source of errors, it is worth noting that spaces are not permitted on either
side of the colon following FROM in the MAIL command or TO in the RCPT command"

Change-Id: Ie5330bf2bd01cd8f734134dadd742cf16df70d7a
Signed-off-by: Jack Bates <jack@nottheoilrig.com>

cherry-pick of https://android-review.googlesource.com/#/c/32640/
2013-04-05 13:42:13 -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 7fdde9bb4a Cache column name/indexes so we can use getColumnIndex()
MatrixCursor doesn't do this, so we need to add our own cache.

Depends on Ia5ffd31f54a2a335f495df5e0d1a0886ee08c14b

Change-Id: Ica78e3cec747bf86fcef16508156e359216c64fe
2013-02-06 17:09:42 -08:00
Scott Kennedy f9997921cb Change Email vibrate setting from tri-state to checkbox
Migrate the old value as necessary.
Update the unit tests.

Cherry-picked from I1c276ffde3496cbc66846ed4a007088d39f20382 with
minor changes.

Bug: 7624838
Change-Id: I1b3fa331b62f556701bacba5ce9cd64305d9b52a
2012-11-29 12:16:33 -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 c5afb16430 Add a bunch of stuff missed earlier
Change-Id: I7f707446a963912fe5786dacb5569e68db572d1c
2012-06-28 12:16:59 -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 83adfb99a0 Continue generalization of account setup
* Put most setup parameters in services.xml (at a later date
  these can be obtained directly from services, but we're not
  in a position to modify Exchange until next OS release)
* Make more parts of setup reference service information rather
  than directly refer to specific protocols
* Base account type buttons on declared services
* Continue the effort to make Stores obsolete

Change-Id: I50d08f3c0676e606b6b6c09fc22571ee5a7690e6
2012-06-14 14:27:39 -07:00
Marc Blank 323eea8ac8 Don't use a repeating alarm for AttachmentDownloadService
* Guarantees we can't have runaway alarms
* Manually merged from Email1

Bug: 6494254
Change-Id: I7f272f650ab34d50ec71ad503951ada3bbf203af
2012-05-18 14:09:46 -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 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