Commit Graph

894 Commits

Author SHA1 Message Date
Scott Mertz
7f1a3b1f12 EmailTests: fix api change
Change-Id: I170478bb91d847ba9d42515c5d5c29a92f3765dc
2015-10-18 14:05:32 -07:00
Jorge Ruesga
dcdf4ab236 email: fix tests
Change-Id: I237337c0c86ad66023db684c8a01c89ee1ef7aef
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:05:32 -07:00
James Lemieux
f1b6b3afd9 Old paper clip asset is removed, which touches a test case here.
Change-Id: Ie070eaeb7d3c4a3663da4cd4761328241ce6467f
2014-09-22 14:00:00 -07:00
Paul Westbrook
bb68c13afa Changes to support smaller email tombstone apk size
This reduces the tombstone down by 100K

A follow-on cl will remove the unused resources from the tombstone build

Bug: 17414014
Change-Id: I5d38811b17a5273ec726e750ab123e10e36cee04
2014-09-16 13:59:07 -07:00
Paul Westbrook
8f0f19c414 Remove unused resources
Also remove broken & disabled tests that referenced otherwise
unused resources

Change resource names to prevent duplicate resources.

Bug: 17414014
Change-Id: Iea9f9799ec19692707e2949473c6f97a3bd29f4b
2014-09-10 03:24:53 -07:00
Paul Westbrook
d37ca267dd Clean up proguard test flags file
Change-Id: I2db858b59e0b1c6ff199aa7b11b99ee6e019ea72
2014-08-01 16:44:56 -07:00
Tony Mantler
8f5ca5a790 Rename AccountSettings to EmailPreferenceActivity
Change-Id: I972cdae394081b5ec028c38b9274e64ef5822d4a
2014-07-14 11:44:52 -07:00
Tony Mantler
8c03e2af9f Remove direct entry points to AccountSettings
b/16240332

Change-Id: I9bc3f9a2e0b7faa4d8875a9ac7d6d585a65d9733
2014-07-11 21:34:55 +00:00
Andrew Sapperstein
9fc5b8d80d Fix build.
Change-Id: I3c84b1ccb2171672857f523ed636de456fa7313a
2014-07-01 16:45:31 -07:00
Tony Mantler
88580cd5e0 Merge "Unify settings activity" into ub-mail-master 2014-06-27 15:56:14 +00:00
Tony Mantler
06415a635f Unify settings activity
b/9566150

- Install PublicPreferenceActivity
- Create AccountServerSettingsActivity to contain all the crazy
    logic we don't want in AccountSettings
- Add restoreAccountWithAddress to Account
- Refactor almost everything out of AccountSettings
- Tidy the QuickResponse fragment
- Majorly refactor the AccountSettingsFragment to decouple it from
    the activity, and make it save settings immediately instead of
    when pausing
- Move login warning dialog to AccountSettingsFragment
- Tweak HeadlessAccountSettingsLoader

Change-Id: Ie69181d968b9c3e5940cfef9690b1f5c70e21aa8
2014-06-27 10:49:18 -07:00
Anthony Lee
3d16e5d4b9 Move over to the new AttachmentService.
Change-Id: I4a687b003884ea6a92a755fcbf394001bfc96a38
2014-06-25 09:56:29 -07:00
Anthony Lee
ff52eef8e6 Revamp logging & remove the threading around downloads.
There is no need to launch a new AsyncTask around adding an
attachment to the queue of downloads. We can restore the attachment
in the worker thread of AttachmentService instead. Also reworked
the logging so we can trace the flow of the AttachmentService if
we need to debug again in the future.

Change-Id: I368ebb4322bc0af0f4cadedf102959d621e5ee80
2014-06-24 15:24:47 -07:00
James Lemieux
9250f47872 Unit Tests for serialization of Account and HostAuth objects
b/14998528

These are particularly important since they are stored in JSON form within the
Account Manager, so maintaining backward compatibility when future changes are
introduced is crucial.

Change-Id: I51333a364726a4c7e2fe88ee888e8c4cc11d962f
2014-06-09 16:18:27 -07:00
Anthony Lee
39e3bd63b5 Some more cleanup and code rearrangement & added unit tests
for ServiceCallback.

Change-Id: I6017e50455df3dda9ef6ec54ffd4fbc4e9b1a2d9
2014-06-05 14:57:44 -07:00
Tony Mantler
4ce1fc7669 Disambiguate settings intents
b/13325901

Change-Id: I2843a6bfdac4acbabc758ddc44f1d980b7036aef
2014-05-22 14:31:22 -07:00
Tony Mantler
5021265826 Merge "Test encode/decode of attachments" into ub-mail-master 2014-05-21 17:48:53 +00:00
Tony Mantler
5a93b8f7c6 Test encode/decode of attachments
b/15089448

Change-Id: Ifd2afcfb36c9820c5d64ebbcc3230603b2a27089
2014-05-21 10:25:08 -07:00
Anthony Lee
a72a12241f Factored out Watchdog code and cleaned up other stuff.
Moved testing code to the bottom of the file. The next CL
should be the removal of the DownloadSet. Also fixed b/15003801,
so that the test will not fail.

Change-Id: Ie8320782d6b292d5a367af95d7c58d70a4213ead
2014-05-20 15:11:03 -07:00
Tony Mantler
9b8dafe23a Add test for HostAuth parceling
b/14998526

Change-Id: Ic92424f6f2fc2eec261e2ce91158cc396eb24ffc
2014-05-15 23:24:05 +00:00
Tony Mantler
82a207132b Move account backup/restore to userdata in AccountManager
Change-Id: Iea9f2a1b1f2d87e07d63cbb1df5a0d6355ea4031
2014-05-14 15:15:49 -07:00
Anthony Lee
825aa02a6f Merge "Introduction of DownloadQueue and associated tests." into ub-mail-master 2014-05-13 18:28:28 +00:00
Tony Mantler
2f97a7c658 Clean up unused code and warnings in Account
Change-Id: I40475eb6c8afa6b7b28fd143b9ad4fd268ff4657
2014-05-13 10:46:30 -07:00
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