Commit Graph

415 Commits

Author SHA1 Message Date
Martin Hibdon
30a5e1d461 Add copyright notice
Change-Id: I80e074196ca8cb6962d400a756c510c8e3105899
2014-07-14 12:10:20 -07:00
Martin Hibdon
bb391e8018 Merge "Update IEmailService" into ub-mail-master 2014-07-14 17:08:38 +00:00
Martin Hibdon
7afbeee47e Update IEmailService
Add version support
Change deleteAccountPIMData to deleteExternalAccountPIMData.
Data kept inside the EmailProvider can be deleted from within
the Email app. Only external data (e.g. contacts and calendar)
need to be deleted by the service which has protocol specific
knowlege.

Change-Id: I875d3051d0cfdbaf52775ec20eb114a345894a93
2014-07-11 15:49:45 -07:00
Tony Mantler
8c03e2af9f Remove direct entry points to AccountSettings
b/16240332

Change-Id: I9bc3f9a2e0b7faa4d8875a9ac7d6d585a65d9733
2014-07-11 21:34:55 +00:00
Régis Décamps
c3404cca71 Better documentation for "Account display name".
Give examples of what the display name is.

Change-Id: I2934dc9e8b95d0b32b9c1e9fab391d7ba9e997da
2014-07-10 19:54:02 +02:00
Martin Hibdon
1d8fd9c054 Add communication class for HostAuth
We want a separate class for communicating HostAuth objects
to and from IEmailService. The issue is that the HostAuth object
was being used for both to and from the database, and to and from
IEmailService. This is dangerous because The Email app may change
out of band with the Exchange app, and may need to change the
format of HostAuth. This bit us before when adding OAuth.
Now communication to IEmailService is done using HostAuthCompat.

Change-Id: I2fb8c2bd8158f58a7bb9bc3dc83a7936948c718c
2014-07-07 15:08:52 -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
Paul Westbrook
4038f464de Enable supression of combined account
This enables the client of the provider to suppress the email combined
account.  Later, the UI can enable a combined account that spans all of
the account types

Change-Id: I77e201f751019240af2274a1f74e2124b9889aab
2014-06-20 00:09:07 -07:00
Martin Hibdon
fb2a3a2f77 Update IEmailService
This is not yet finalized, but it's needed to fix push syncs
on exchange.

Change-Id: Iaff20aa0bdea9685ef6603de1f861d58fbab6ff1
2014-06-18 14:19:34 -07:00
Tony Mantler
51af59fc66 Remove unused preferences and dead code
Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
2014-06-10 11:29:17 -07:00
James Lemieux
97fb20697c Merge "Unit Tests for serialization of Account and HostAuth objects" into ub-mail-master 2014-06-09 23:33:17 +00: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
Tony Mantler
524e0a5fbc am 73101f3a: Fix OAuth when changing credentials from settings
* commit '73101f3a7bc1e735199a7c2c18358e9db9af0bca':
  Fix OAuth when changing credentials from settings
2014-06-09 22:50:37 +00:00
Tony Mantler
73101f3a7b Fix OAuth when changing credentials from settings
b/15521401

Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5
(cherry picked from commit 994c282d80)
2014-06-09 22:45:45 +00:00
Tony Mantler
994c282d80 Fix OAuth when changing credentials from settings
b/15521401

Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5
2014-06-09 15:28:11 -07:00
Tony Mantler
f765f9b976 Clean up cert activity handling
Fix re-displaying the dialog on orientation change b/5622284
Add host/port when available b/4988512
Disambiguate intent between AOSP and EmailGoogle

Change-Id: Ideeda20dfd9bd0070998ccf42d8042765866ca0e
2014-06-05 13:21:08 -07:00
Martin Hibdon
163323294e Change IEmailService.sync to have two different forms
Change-Id: Id8e770154d6116b02746cbdfb8c7cdc9358398de
2014-05-30 14:49:47 -07:00
Martin Hibdon
c5f5a14ae9 Revert "Get rid of deleteAccountPIMData from IEmailService"
This reverts commit cf2178c4fa.

Change-Id: I9b05dd7a29a2d2edf64529ca28e2305737a43115
2014-05-21 20:41:37 +00:00
Martin Hibdon
cf2178c4fa Get rid of deleteAccountPIMData from IEmailService
This doesn't need to be part of the service because the
implementation doesn't need to be different between any
of the different protocols.

Change-Id: Ifddf16dd3ccaf397029f08f6d4283d9a5630f717
2014-05-21 12:18:29 -07:00
Tony Mantler
c1265d2090 Merge "Move email bodies to files" into ub-mail-master 2014-05-15 16:43:00 +00:00
Tony Mantler
34c2e1619d Fix FLAG_OAUTH usage
Also fix some excessive checking of incoming/outgoing settings fragments

b/14969455 b/14971192

Change-Id: I6cf83aa59d381d3bbfc33e0d4a6e133c1814ba69
2014-05-14 16:31:04 -07:00
Tony Mantler
82a207132b Move account backup/restore to userdata in AccountManager
Change-Id: Iea9f2a1b1f2d87e07d63cbb1df5a0d6355ea4031
2014-05-14 15:15:49 -07:00
Tony Mantler
7525feb244 Move email bodies to files
Change-Id: Icfd0c4ab2ad25cc02b45cf41e7a205c17948ef2c
2014-05-14 13:27:49 -07:00
Tony Mantler
8518665a04 Fix projection columns, begin removing another unused field
Change-Id: I89126dba47ed6e78c870d458c4f286a37f763a66
2014-05-13 15:41:39 -07: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
bca4f9fcfb Service intent's package matches the content provider's.
b/14596165. When setting the package of the service intent,
query the app that implements the Email content authority since
that is the same app that should handle the intent.

Change-Id: I29a34a056516edda78acb83b9c89547ca0dc5ca1
2014-05-11 00:47:44 -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
Tony Mantler
aab514c942 Catch empty mime type and substitute application/octet-stream
b/14564897

Change-Id: Id91dd18ef8b3fab449eb178bde73303107b78590
2014-05-05 13:26:22 -07:00
Tony Mantler
32471fc22e Catch exceptions when DownloadManager is disabled
b/14562210

Change-Id: If3f2da034e8492de049bc3bcac910a033c47d600
2014-05-05 10:23:12 -07:00
Tony Mantler
564a5343cc Merge "Don't allow empty or null filenames" into ub-mail-master 2014-05-05 16:14:56 +00:00
Tony Mantler
d0b54a2948 Don't allow empty or null filenames
b/14500106

Change-Id: I519e4a0fe392c3bdbb84f1ccbdea89f07b9c1426
2014-05-02 16:42:46 -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
Tony Mantler
d786b90cb5 Don't allow non-constant format strings
Also clean up warnings and delete unused code

b/14488939

Change-Id: I0fc552b8437958331c30f2ddd05ae33c0010e79f
2014-05-02 10:05:27 -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
40de3040e9 Merge "Warnings and finals" into ub-mail-master 2014-04-29 21:22:01 +00:00
Tony Mantler
d3154ecc6e Warnings and finals
Change-Id: Idc31b2f3376db73b90558fb22bdcdf4ff6f92b7d
2014-04-29 13:36:24 -07:00
Tony Mantler
4aec413a1e Warnings and Finals
Change-Id: I47f29c16c066eb077c64ef8c89e91df88d15caf0
2014-04-29 11:46:22 -07:00
Anthony Lee
533093abd7 Make sure that queries against the Body table have ID columns.
Performed some cleanup and updated the source key projection
to include an ID to make sure that EmailMessageCursor works
properly.

Change-Id: I272fac474de876fdd2a08136e0ba97b3f5dc2c7e
2014-04-28 16:11:04 -07:00
Anthony Lee
dc6bb6aa41 b/14075613. Treat empty strings the same as null strings.
Found this issue when addressing the root problem for this bug and testing
with various mixes of text and html content in emails.

Change-Id: I875fd9fac85b07484c27db383e3ac4a3cb935ee6
2014-04-22 14:12:20 -07:00
Tony Mantler
3c73a04bec Continue purging the unused reply parts
Change-Id: I47b5bbe50ba36e68ad7ba80647f401b992660ba1
2014-04-18 14:04:23 -07:00
Tony Mantler
fd69e5b036 Purge unused/obsolete body fields
Change-Id: Idafa09b58f5753e4cb3cad754c861cc8e3d80c34
2014-04-17 14:32:10 -07:00
Tony Mantler
9caaebb142 Bypass the cursor completely when passing message within EmailContent contexts
We should investigate using PFDs when passing to the UI layer too, for consistency

Change-Id: I21ad1987926b93af20287ae8e49bfc7a4ad99570
2014-04-16 16:49:29 -07:00
Tony Mantler
3dd85723a1 Cleanup in EmailContent
Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
2014-04-14 12:54:39 -07:00
Tony Mantler
80d7676985 Remove flawed body-mangling code, add some finals
Change-Id: Ia3dc53cc36e5c2912d4366d4e1a0d69b87c4409b
2014-04-11 14:50:22 -07:00
Tony Mantler
2aeb498d4e Fix attachment loading for messages which have been forwarded
These attachments have a contentUri where the attachment ID is not equal
to the ID of the actual attachment.

b/13900073

Change-Id: Ic62b8165be2e80bc47eac40dc9eb5ac53c3cd6c5
2014-04-08 14:18:56 -07:00
Martin Hibdon
dc0ac5a316 Upgrade my logging from .e to .wtf
b/13640564

Change-Id: I360aa6bab99cc1c414b4f89fcfe3c82eb6e282c3
(cherry picked from commit 8eaa3f029e)
2014-03-27 21:30:46 +00:00
Martin Hibdon
4d6225d699 Merge "Add logging to help track down a bug causing invalid credentials" into ub-mail-algol 2014-03-27 21:30:15 +00:00