Commit Graph

4787 Commits

Author SHA1 Message Date
James Lemieux f79ed0f54f Merge "Remove attachment previews from Conversation List" into ub-mail-master 2014-07-11 16:34:41 +00:00
Tony Mantler b7e0834121 Add support for UPDATE_SETTINGS_URI
b/16188467

Change-Id: I6a948292e4406e01d68ed5c961912c492367717d
2014-07-11 11:25:58 -07:00
James Lemieux a546307c1d Remove attachment previews from Conversation List
This includes:

- all references to the 3 attachment preview columns in the Gmail
conversation table (except for migration code in MailStoreInitializer)
- all layout and drawing code for attachment previews in conversation list
- all assets related to attachment previews
- all preference and analytics code that aided attachment previews

NOTE: This does not alter, in any way, the display of attachments in
conversation view.

Change-Id: Iccefd2fcf146ccdad927e7911900f370baaf8a1d
2014-07-10 16:56:11 -07:00
Tony Mantler f90dbc83e2 Strings aren't Integers
b/16189015

Change-Id: Ife4383b5530956fcca7f7970691e9fdec32007ec
2014-07-09 16:02:01 -07:00
Tony Mantler 4fb5412e1b Switch to material icons for Email
b/15966080

Change-Id: I5d6097e37cb47356fc70a38e1aa2ae0c41e9ae7a
2014-07-08 15:55:40 -07:00
Tony Mantler 6c15188a9e Merge "Close body input streams" into ub-mail-master 2014-07-07 17:47:39 +00:00
Tony Mantler a3d4117117 Close body input streams
b/16153171

Change-Id: Iab1224957d1079969be51d2843df5250c8660b8a
2014-07-08 09:39:50 -07: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
Andrew Sapperstein c07a442403 quantum change labels b/16054906
Change-Id: I0b8a639ccb76f2945e3839b10d59cf646d168e57
2014-07-03 18:28:01 -07:00
Tony Mantler e292027fa7 Pre-cache attachment content URIs
Saves us a DB read on the UI thread.

b/15939030

Change-Id: I1b8174880ccc9dc06df6b57df2bd8d44a2fe05d4
2014-06-30 10:24:12 -07:00
Tony Mantler 04a621aa2c Override archive/delete behavior
b/15935182

Change-Id: I36210535dacc796a1dbaaabd5e16434e88e556db
2014-06-27 14:20:58 -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
Tony Mantler 9a311806ca Merge "Change SENDING_UNAVAILABLE to VIRTUAL_ACCOUNT" into ub-mail-master 2014-06-26 17:57:04 +00:00
Tony Mantler c2b1056a61 Change SENDING_UNAVAILABLE to VIRTUAL_ACCOUNT
b/9566150

Change-Id: Ic8c009d2440eb2f4b2cd6343b50118b81d636fb6
2014-06-26 14:21:26 -07:00
Régis Décamps 5026028300 Refactor how the warm welcome is triggered.
MailActivityEmail doesn't need to implement WelcomeTourCompletionListener anymore.

b/15705426

Change-Id: I911eb8eac6e6759448065e68e85d6f347693ea82
2014-06-26 10:19:53 +02: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
Jay Shrauner 5bcb36eb10 Fix NPE from null Folder
Catch empty folder cursor in migrate() and log error message and
continue as with other empty cursor handling in loop.

Bug:15854046
Change-Id: I13c0a1909755f62f318d7c2b237adb03df68ba86
2014-06-24 10:40:47 -07:00
Tony Mantler 5f24f6f2e5 Merge "Return settings fragment class for account" into ub-mail-master 2014-06-23 21:44:43 +00:00
Jay Shrauner 5417166477 Merge "Fix NPE in onBasicsComplete" into ub-mail-master 2014-06-23 21:44:43 +00:00
Jay Shrauner 73a561fbbd Fix NPE in onBasicsComplete
Check for null mExistingAccountsMap as is done in finishAutoSetup().

Bug:15835752
Change-Id: I9e01d36990e107dc2c89f345c5e6f4565f071913
2014-06-23 15:10:11 -07:00
Jay Shrauner 9adf186c5b Catch negative literal sizes in imap responses
Check for negative sizes for literals so that we don't crash attempting
to create a negative sized array.

Bug:15834346
Change-Id: I1fbd9b86c807f1e97100fbfe52ef402a337bf655
2014-06-23 14:55:30 -07:00
Tony Mantler 2eecdd1a50 Don't leak cursors
b/15830514

Change-Id: I91f452fc7c14a076d7f9078ec066215b28ddc3c3
2014-06-23 13:38:22 -07:00
Tony Mantler 876c8e1408 Return settings fragment class for account
b/9566150

Change-Id: Ia88f09d651284ff8f25a1784dc9a93ee30e6ea52
2014-06-20 14:32:15 -07:00
Paul Westbrook c24d5d4f19 Merge "Enable supression of combined account" into ub-mail-master 2014-06-20 02:15:46 +00: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
Tony Mantler 7b9f7ff76f Make AccountSettings subclass MailPreferenceActivity
b/9566150

Change-Id: I62e0115f11761f9019a1f1ecf96de82bbbb80c3a
2014-06-19 16:01:11 -07:00
Martin Hibdon b63b39d03e am 9c0463e6: Don\'t offer oauth unless we have at least one provider
* commit '9c0463e6b485b3b50d9c6f110a9ece650cd4a692':
  Don't offer oauth unless we have at least one provider
2014-06-19 21:46:59 +00:00
Martin Hibdon 9c0463e6b4 Don't offer oauth unless we have at least one provider
In the AOSP version of the email app, we don't by default
have any oauth providers. We should not display option
to set up your account with OAuth.

Change-Id: I6fc55ae4852ec76b7c34c09ac58a0e06e89affa7
2014-06-19 13:28:06 -07:00
Martin Hibdon 9e9aaa642c Merge "Update IEmailService" into ub-mail-master 2014-06-18 19:24:54 +00: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 6f747eb776 Unify general settings
Make Email GeneralPreferences subclass GeneralPrefsFragment.

Only contains a minimum of code to strip out archive-related prefs,
which are not relevant to the current state of Email back-ends.

(These actions could be relevant for Gmail IMAP extensions if support is added for them)

b/9566150

Change-Id: Ie8e26379ed504c7d96c2a2f8e1c843bbe0582cc7
2014-06-17 13:24:20 -07:00
Paul Westbrook e817be1353 Specify compose activity with resource.
Allow the compose activity, that the account reconciler attempts
to enabled/disable, to be able to be specified via resources.

This allows the various build targets to change the activity that is
enabled/disabled, or to not attempt to do this at all

Change-Id: I7c91c2c179316a3aac910a38d7dd0025076b085a
2014-06-17 15:47:33 +02:00
Greg Bullock b71fe22a93 Null implemention of the getWelcomeTourFragment method for Email.
Change-Id: I6e2e0917b70953f58aeed019066db118ca46fe70
2014-06-16 21:01:27 +02:00
Tony Mantler 93ec28ec41 Merge "Listen for relevant shared preferences changes" into ub-mail-master 2014-06-16 15:39:47 +00:00
Tony Mantler c8d8a8445e Listen for relevant shared preferences changes
b/9566150

Change-Id: If6005de568330d12e2838220b815467d58276d71
2014-06-16 13:30:25 -07:00
Tony Mantler 988ad6e002 Move all general prefs values to UnifiedEmail
b/9566150

Change-Id: Id7058586c71c3c1cc4933dc28532a02df90c29bc
2014-06-12 16:23:52 -07:00
Alan Lau 8183be889f am 9773c96d: Return the order key in the conversation cursor.
* commit '9773c96d83f126b8418b192bcf46f939f44fdb44':
  Return the order key in the conversation cursor.
2014-06-12 17:11:50 +00:00
Alan Lau 9773c96d83 Return the order key in the conversation cursor.
For Email the order key is the message timestamp, Gmail sortMessageId.  The
order key is then used as the sort key for notificatin api, and because it is
stable, notification bridger can avoid bridging duplicate notifications and
reodering the email card bundle on the watch.

Bug 15563260

Change-Id: Ie68f45de91cc42c58238b7cdc0ae828048e22a46
2014-06-11 16:16:41 -07:00
Tony Mantler 14623ba3c2 More dead code
Change-Id: I3178d47c955b060c5d5ab1f0029347b325887fa0
2014-06-10 15:53:23 -07:00
Tony Mantler 51af59fc66 Remove unused preferences and dead code
Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
2014-06-10 11:29:17 -07:00
Tony Mantler 5da2f12dc5 Make incoming settings username editable
And get rid of that annoying "you can't edit this" info text bubble

Change-Id: I7efc039b39be292512f25bd5470b7ae36927c8f3
2014-06-09 16:23:57 -07: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
Anthony Lee 11708a64a5 Merge "Some more cleanup and code rearrangement & added unit tests for ServiceCallback." into ub-mail-master 2014-06-05 23:41:56 +00: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 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
James Lemieux a8c8a745a8 Merge ""No quick responses available" should display when all quick responses are deleted" into ub-mail-master 2014-05-30 22:46:22 +00:00
Martin Hibdon a6e65290be Merge "Change IEmailService.sync to have two different forms" into ub-mail-master 2014-05-30 22:15:54 +00:00
Anthony Lee e8cdcc7250 Merge "Cleanup of AttachmentService code and enabling of DownloadQueue." into ub-mail-master 2014-05-30 22:06:49 +00:00
Martin Hibdon 163323294e Change IEmailService.sync to have two different forms
Change-Id: Id8e770154d6116b02746cbdfb8c7cdc9358398de
2014-05-30 14:49:47 -07:00
James Lemieux 6dce0b1819 "No quick responses available" should display when all quick responses are deleted
b/14239989

We take advantage of ListView's feature that displays an entirely different
view in place when the backing Adapter is empty. The empty view is simply a
TextView displaying "No quick responses available".

Change-Id: I244ffd21fc4c1557c73979d4bb7c99306b11ebb2
2014-05-30 14:49:05 -07:00
Anthony Lee e33511699a Cleanup of AttachmentService code and enabling of DownloadQueue.
Removed unused functions, 'final'ed variables and parameters,
revisited some thread synchronization. Effectively no new code
introduced so no unit tests for this CL.

Change-Id: I714724a98d31a231ab10b0ad468b8efaa460bd1d
2014-05-30 13:26:08 -07:00
Andrew Sapperstein 970b4b7eb2 am 4e6aa252: Merge "Support hooks for new contact photo source." into ub-gmail-ur13-dev
* commit '4e6aa25286d9971e9574d5e3470ad99a15cf93ce':
  Support hooks for new contact photo source.
2014-05-28 19:41:13 +00:00
Andrew Sapperstein 4e6aa25286 Merge "Support hooks for new contact photo source." into ub-gmail-ur13-dev 2014-05-28 19:38:41 +00:00
Jay Shrauner f3440d33a9 Fix NPE in setAccountPolicy
Check for null returned by Account.restoreAccountWithId as with other places
where it is called.

Bug:15286267
Change-Id: I56d59564a1fa814f5c52b44c12303014eea2b0b0
2014-05-27 14:05:56 -07:00
Tony Mantler 4ce1fc7669 Disambiguate settings intents
b/13325901

Change-Id: I2843a6bfdac4acbabc758ddc44f1d980b7036aef
2014-05-22 14:31:22 -07:00
Martin Hibdon 92a059ece4 Merge "Revert "Get rid of deleteAccountPIMData from IEmailService"" into ub-mail-master 2014-05-21 20:43:10 +00: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 9598c1e817 Merge "Get rid of deleteAccountPIMData from IEmailService" into ub-mail-master 2014-05-21 20:31:08 +00:00
James Lemieux 332f544991 Merge "Sanitize HTML email bodies in Android Email" into ub-mail-master 2014-05-21 20:12:06 +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 44d3500f7a Merge "Remove unused constant" into ub-mail-master 2014-05-21 17:53:04 +00:00
Tony Mantler 5021265826 Merge "Test encode/decode of attachments" into ub-mail-master 2014-05-21 17:48:53 +00:00
Tony Mantler 4abb30384f Remove unused constant
b/15133133

Change-Id: Ia89829e796dadf48f0257adb994c7102b7d30baf
2014-05-21 10:33:15 -07:00
Tony Mantler 5a93b8f7c6 Test encode/decode of attachments
b/15089448

Change-Id: Ifd2afcfb36c9820c5d64ebbcc3230603b2a27089
2014-05-21 10:25:08 -07:00
James Lemieux 837aba39d5 Sanitize HTML email bodies in Android Email
b/14567151

Sanitizes HTML email bodies on demand as they are requested from
EmailMessageCursor. Also alters Account settings to indicate that emails can be
assumed to be sanitized and transform scripts can be applied to the email
bodies.

Change-Id: I789e6de3569ae8c7d2c21f0b5aa590d7638a1467
2014-05-20 16:26:58 -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
Andrew Sapperstein 6c31d220a8 Support hooks for new contact photo source.
b/11387812

Change-Id: If081d58941dca0a330905dc2d80148df336995d5
2014-05-20 14:40:08 -07:00
Tony Mantler ee818ac898 Add missing space in MIME header
Also skip adding the filename if none exists

b/13138456

Change-Id: I2e3d82c2a560049cfc3fcd0130f4c6d8020757a2
(cherry picked from commit 8b80821645)
2014-05-20 18:16:41 +00:00
Tony Mantler 8b80821645 Add missing space in MIME header
Also skip adding the filename if none exists

b/13138456

Change-Id: I2e3d82c2a560049cfc3fcd0130f4c6d8020757a2
2014-05-19 15:05:07 -07:00
Tony Mantler 9a44073e75 Fix the remainder of save-alert cases
b/14969455

Change-Id: I19b138b7d5b30a4f617a1af9a5be878c03068327
(cherry picked from commit 28dd431c23)
2014-05-19 21:41:13 +00:00
Jin Cao 81ff6fae02 am cd4a94b7: Dependent change caused by refactor of FolderSelectors
* commit 'cd4a94b7e1ff89961c422682d562149744dac0e7':
  Dependent change caused by refactor of FolderSelectors
2014-05-19 21:26:54 +00:00
Jin Cao cd4a94b7e1 Dependent change caused by refactor of FolderSelectors
b/9174917

Change-Id: I1d644fe52b3b3e0c3428c6007d4c591a87a45e6c
2014-05-19 12:41:00 -07:00
Tony Mantler 28dd431c23 Fix the remainder of save-alert cases
b/14969455

Change-Id: I19b138b7d5b30a4f617a1af9a5be878c03068327
2014-05-15 14:58:54 -07:00
Martin Hibdon 4461f1d99e am 4b5b7886: Merge "Disable the debug menu" into ub-mail-algol
* commit '4b5b7886bc91c27688387ae00e552ad8540eb3e7':
  Disable the debug menu
2014-05-15 20:42:34 +00:00
Martin Hibdon 2c26bb3b09 Disable the debug menu
b/14995079

Change-Id: I0b7fa2edc7cf7cdac97aba9412a18aece09cb5c2
2014-05-15 13:35:33 -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 018ff4b464 Merge "Fix FLAG_OAUTH usage" into ub-mail-master 2014-05-15 16:42:41 +00:00
Tony Mantler 0cb5fd3f7f DO NOT MERGE Fix URI comparison
b/14914981

The framework may make copies of the URI objects before they're passed in,
so we should use .equals() instead of pointer equality.

Change-Id: Ia443e96c81d53829ac6cfce70cebc098861f1c78
(cherry picked from commit e8a3c14f28)
2014-05-14 23:36:31 +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
James Lemieux b3db04b80b Stop EmailProvider from zealously and uselessly notifying of changes
EmailConversationCursor eagerly marks all messages in the current mailbox
as being seen. Most of the time it is a redundant operation, but nothing
prevents the provider from broadcasting notifications and all of the
observers from dutifully reacting to the notification. A good deal of
work is avoided now that we only notify when rows in our database have
actually been altered.

Change-Id: Ie91e6aebaf9c2899510f3818586d582073954d16
2014-05-14 15:38:35 -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 97ddf6e5fa Merge "Fix URI comparison" into ub-mail-master 2014-05-14 18:34:33 +00:00
Tony Mantler e8a3c14f28 Fix URI comparison
b/14914981

The framework may make copies of the URI objects before they're passed in,
so we should use .equals() instead of pointer equality.

Change-Id: Ia443e96c81d53829ac6cfce70cebc098861f1c78
2014-05-14 11:32:20 -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 8989dfa5e7 Fix cancel handling in account settings screens
- Don't loop on the confirmation dialog
- Do a deep copy of the initial hostauth state
- Save the initial hostauth state on configuration changes
- Collect the user input before comparing the old state with the new

b/14285245

Change-Id: Ibc033fac525be2a4cb03c6a0d1e92254a2236b4c
(cherry picked from commit 294593c5f5)
2014-05-08 21:27:23 +00:00
James Lemieux 6825796063 Create separate thread pool for EmailMessageCursor
This avoids a potential thread starvation issue if all running threads
in the default parallel executor are stalled waiting to read from the
threads created here.

Change-Id: I32f030b3e7ff3d8f69453ae5946704efb19ee25f
2014-05-07 16:40:34 -07:00
Tony Mantler 84e010a463 Clean up logging
b/14590064

Change-Id: Ib841ebecae339690c143eaf356eced58d9ac5372
2014-05-06 11:22:10 -07:00
Tony Mantler 91e8e6f709 Null check EmailServiceInfo
b/14567915

Change-Id: I4780835a7f195f1a825a1538f9f1b939e2be4214
2014-05-05 13:59:39 -07:00
Martin Hibdon b5713fb731 am 81f9a57a: Fix some STOPSHIP logging
* commit '81f9a57a655fe842ddd86b14afe75bcd575edb81':
  Fix some STOPSHIP logging
2014-05-05 20:19:12 +00:00
Martin Hibdon 81f9a57a65 Fix some STOPSHIP logging
b/14564870

Change-Id: I9365013eacde23178578b45f728713f80417bc7a
2014-05-05 13:04:19 -07:00
Tony Mantler 4db2d1cf74 Escape string values passed into SQL
b/14562987

Change-Id: Ibefd8d1d7418fffe4467abdae0cf978228d303a0
2014-05-05 10:51:44 -07:00
Tony Mantler f837c474a4 resolved conflicts for merge of 0d7c7091 to ub-mail-master
Change-Id: Id754089f16146daf0c07f77208d55c2406c997c5
2014-05-01 15:27:21 -07:00
Tony Mantler 0d7c709125 Always return a valid Uri for account inbox
Also don't return virtual folders unless real folders exist

b/14319452

Change-Id: Id5f62f5ccc4d5488ae467df741b0598a158ceb81
2014-05-01 15:05:15 -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
Anthony Lee cd2495ebdd Created the new AttachmentService class.
This is a straight up copy of the AttachmentDownloadService and
a rename. All the future Attachment work will be done in this
class and we'll flip the switch when it is ready.

Change-Id: I2990cbfd1f7c8e2946c155ea1c124223d0f47ff9
2014-04-29 11:20:40 -07:00
Tony Mantler 2ac92114ad Merge "Fix cancel handling in account settings screens" into ub-mail-master 2014-04-25 00:41:28 +00:00
Tony Mantler 294593c5f5 Fix cancel handling in account settings screens
- Don't loop on the confirmation dialog
- Do a deep copy of the initial hostauth state
- Save the initial hostauth state on configuration changes
- Collect the user input before comparing the old state with the new

b/14285245

Change-Id: Ibc033fac525be2a4cb03c6a0d1e92254a2236b4c
2014-04-24 16:12:55 -07:00
Andrew Sapperstein d4088d1b8a am 241eeec2: Remove save to drive from eml viewer. b/14277510
* commit '241eeec2b3f7f5a0159d1a313c31d6682c439511':
  Remove save to drive from eml viewer. b/14277510
2014-04-24 21:53:40 +00:00
Andrew Sapperstein 241eeec2b3 Remove save to drive from eml viewer. b/14277510
Change-Id: I918e66fb009976543bcb8a58b1b4597a5b268062
2014-04-24 10:39:58 -07:00
Martin Hibdon 70d7473fb9 am 92581f78: Move the setup nav buttons to the bottom on tablets
* commit '92581f78207a23b0777795f5d5ffcff683aa1e21':
  Move the setup nav buttons to the bottom on tablets
2014-04-23 17:38:10 +00:00
Martin Hibdon 92581f7820 Move the setup nav buttons to the bottom on tablets
b/14187851
Now the bars on the sides for tablet landscape setup are actually
in the activity, not the fragment. The setup fragment template
is identical between tablet and phone, with any differences between
them contained in different styles or dimensions.

Change-Id: Id7005f73aa29ed6010e629873155eb5fdc8e818f
2014-04-23 10:34:16 -07:00
Martin Hibdon b3d0bda59d am 91eec1a5: Use the correct string for the password label
* commit '91eec1a519562149fff96e37299f492d25a49551':
  Use the correct string for the password label
2014-04-23 00:51:50 +00:00
Martin Hibdon 91eec1a519 Use the correct string for the password label
b/14257168

Change-Id: I08a73bbb91bd4f897617617b67cf51fe4f0c2b7f
2014-04-22 17:31:47 -07:00
Martin Hibdon 6bc254d0ed am 8b063aa9: Fix a typo I introduced in a previous change
* commit '8b063aa9797dae585b98be97ad6f503404bc78f7':
  Fix a typo I introduced in a previous change
2014-04-23 00:24:33 +00:00
Martin Hibdon 8b063aa979 Fix a typo I introduced in a previous change
b/14257168
In this CL I changed the name of a string, but missed one
place where it was references.
https://googleplex-android-review.git.corp.google.com/#/c/453472/

Change-Id: I7d943a2209f2defb6f0eb846b6f361a08f40f756
2014-04-22 17:19:33 -07:00
Martin Hibdon bd51bc5c6a am 0dae4d3f: Update a bunch of layouts
* commit '0dae4d3ffb65eb23d5a2ea19acd4603cfba914cd':
  Update a bunch of layouts
2014-04-22 21:55:32 +00:00
Martin Hibdon 0dae4d3ffb Update a bunch of layouts
b/14169396
Swap the positions of the headline text and email image
on account setup basics
b/14257403
Swap the positions of the password and "signed in with XXX"
button on the credentials fragment
b/14255447
Adjust padding to fix a number of alignment issues.

Change-Id: I011e259a86123cf205d86407def2ff774744e005
2014-04-22 14:46:32 -07:00
James Lemieux 8cfbfb50bb Inline images are not displayed for IMAP and POP emails
b/11998344

This solution covers these use cases:

1) Inline images in the Email app.
2) Inline images in .eml attachments in the Email and Gmail apps.

The solution here was to override shouldInterceptRequest(...) in
the WebViewClients and resolve any cid urls that are encountered
within the email body.

EmailProvider and EmlAttachmentProvider both gained the ability to
query for an Attachment object using a message ID and cid (which
is stored in the database column: contentId).

With this new query in place, it was straightforward to fetch the
Attachment in the WebViewClient and then obtain an InputStream to
the file that backs the Attachment to return back to the WebView.

Change-Id: I865a74fc291915c0d66a7492763a5f5682365b92
2014-04-22 11:29:19 -07:00
Anthony Lee 80b26f9f4c Fixed the id vs messageKey confusion in the code based on caller. Also
make sure that we split the code that reads the HTML vs text body into
seperate try-catch blocks because they can fail seperately.

Change-Id: I55bdac469840e8ff84f7c00ccb34d188da072a8e
2014-04-22 10:14:23 -07:00
Tony Mantler 8c91d2e34b am f501d41c: Merge "Add cross-fade to setup flow" into ub-mail-algol
* commit 'f501d41c7b652ec82f077ad90e11544dc02d0563':
  Add cross-fade to setup flow
2014-04-18 22:39:34 +00:00
Tony Mantler f501d41c7b Merge "Add cross-fade to setup flow" into ub-mail-algol 2014-04-18 22:37:32 +00:00
Tony Mantler b5fd6b8905 Add cross-fade to setup flow
b/14164262

Change-Id: I41fe0bf5661d9f7a2b5051604c0b6dbfc4506414
2014-04-18 14:54:55 -07:00
Tony Mantler 42a4dbbf93 Refactor addMailbox() a bit and clean up warnings
Change-Id: I8497f74ec61c380ae4e69487121c50933f568965
2014-04-18 14:28:28 -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 a5ba759443 am b2fd4d25: Merge "Make AccountSettings implement callbacks for check settings dialog" into ub-mail-algol
* commit 'b2fd4d25767938bf693aba12f73f1dd0ee462427':
  Make AccountSettings implement callbacks for check settings dialog
2014-04-18 19:03:26 +00:00
Tony Mantler 1c594b8050 Make AccountSettings implement callbacks for check settings dialog
b/14120112

Change-Id: I9834a772e90d2d13f16a84a70651286759bc9dbc
2014-04-18 11:16:57 -07:00
Tony Mantler 502f6ad7ea Tidy up saveAttachmentBody
Change-Id: I1852ad7d94eec15feb661a87f81869a554d595af
2014-04-17 16:19:23 -07:00
Tony Mantler fd69e5b036 Purge unused/obsolete body fields
Change-Id: Idafa09b58f5753e4cb3cad754c861cc8e3d80c34
2014-04-17 14:32:10 -07:00
Tony Mantler 0e26184ac7 am 6529f2c9: Add some null-checks
* commit '6529f2c99d24f0dd801ed142ce946b46c92d5e9f':
  Add some null-checks
2014-04-17 18:56:23 +00:00
Tony Mantler 6529f2c99d Add some null-checks
b/14117436
b/14120112

Change-Id: I0f56e036ec1a78887523d90ab4e6cda3a05accdf
2014-04-17 11:50:25 -07:00
Andrew Sapperstein 592a85d97d am 1bb18931: Send PLID with message instead of conversation.
* commit '1bb18931e29dfe55a9b3368bd2393ac57c5fdebb':
  Send PLID with message instead of conversation.
2014-04-17 17:20:04 +00: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
Andrew Sapperstein 1bb18931e2 Send PLID with message instead of conversation.
Fixes b/13748439. Sending with conversation required
server-side changes and wasn't actually more memory efficient.
Arguably it would be less efficient.

Change-Id: I8e1be03e183c65e169da5152a4763d5f80460bb9
2014-04-16 11:48:59 -07:00
Tony Mantler 1b8cb007ba am cdfffcf4: Merge "Don\'t re-add fragment if it\'s already been added" into ub-mail-algol
* commit 'cdfffcf4609336445cbaade49581d07ad10e7bf1':
  Don't re-add fragment if it's already been added
2014-04-16 17:46:34 +00:00
Tony Mantler cdfffcf460 Merge "Don't re-add fragment if it's already been added" into ub-mail-algol 2014-04-16 17:44:04 +00:00
Tony Mantler 4822b266ef Don't re-add fragment if it's already been added
b/14088388

Change-Id: Ie86220f2ab3bf6286ba206248b79291a51b04fad
2014-04-16 10:31:45 -07:00
Tony Mantler 131baa26a1 am 75d60f04: Merge "Null check mCheckFrequency before using" into ub-mail-algol
* commit '75d60f045b8344f7a894e895c1bd95957f5e24bf':
  Null check mCheckFrequency before using
2014-04-16 17:20:17 +00:00
Tony Mantler 75d60f045b Merge "Null check mCheckFrequency before using" into ub-mail-algol 2014-04-16 17:17:15 +00:00
Tony Mantler 8a12526a7f am 91ad2631: Be more blunt about saving the right fragment reference
* commit '91ad26315a8769f92af469b06e24033ffd9e6caf':
  Be more blunt about saving the right fragment reference
2014-04-16 17:17:03 +00:00
Tony Mantler 0151a6af62 Null check mCheckFrequency before using
b/14091609

Change-Id: I796774b7133ec68382d2580d0b1cde347aa143f8
2014-04-16 10:11:55 -07:00
Tony Mantler 91ad26315a Be more blunt about saving the right fragment reference
Apparently fragment IDs get recycled so storing the fragment reference
in a bundle can return the wrong fragment later, so that's great.

b/14094356

Change-Id: I7ce4ae46f51371b4179c7e85c343ab86162b5a95
2014-04-16 10:05:44 -07:00
Tony Mantler 204982897b Merge "Bypass the cursor window for email bodies" into ub-mail-master 2014-04-15 22:43:57 +00:00
Tony Mantler f678a18b69 Bypass the cursor window for email bodies
b/11787468

Change-Id: Iba5faa5b825357144d07ec4dfcf010c6af50496d
2014-04-15 15:18:17 -07:00
Scott Kennedy 90118635a9 am 1f4d6e9a: Use the correct R import
* commit '1f4d6e9aa9f6f219f14951e2966043ac379e262c':
  Use the correct R import
2014-04-15 22:06:45 +00:00
Scott Kennedy 1f4d6e9aa9 Use the correct R import
Change-Id: I087087079a47df7693dbec662d53dc73f7bcba43
2014-04-15 14:49:41 -07:00
Tony Mantler 3dd85723a1 Cleanup in EmailContent
Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
2014-04-14 12:54:39 -07:00
Andy Huang 135853d3bc tighten inline attachment view intent builder
Bug: 7659807
Change-Id: I845199fd6848cb5c0a7ebfd2f63f8c3045fffa36
(cherry picked from commit 5687c6dade)
2014-04-10 23:14:07 +00:00
Martin Hibdon add018e4fd am 2172ac41: Merge "Correctly initialize the authentication view" into ub-mail-algol
* commit '2172ac410add578021715d34a92c1bcaff4f3560':
  Correctly initialize the authentication view
2014-04-10 23:12:33 +00:00
Martin Hibdon 2172ac410a Merge "Correctly initialize the authentication view" into ub-mail-algol 2014-04-10 23:09:46 +00:00
Tony Mantler da9189990a am c83366c8: Fix some crashes and misbehavior with account settings screens
* commit 'c83366c88770f336a8e9976af42389c616de0b62':
  Fix some crashes and misbehavior with account settings screens
2014-04-10 23:06:15 +00:00
Martin Hibdon 12e7d101e8 Correctly initialize the authentication view
b/13961322

Change-Id: I96067b30c54131cc65a0282b118f9821d363113b
2014-04-10 16:01:06 -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
Tony Mantler e8c4c22268 Enable Empty Trash in Email
Add markContentsSeen() and emptyFolder() to EmailConversationCursor.
Add 'purge folder' URI for delete() call in EmailProvider.

Change-Id: I2f65f877f8f4e8376eb5c2149b5051931c2ac083
2014-04-10 12:06:43 -07:00
Tony Mantler bae63123ec Merge "Move EmailConversationCursor out of EmailProvider" into ub-mail-master 2014-04-09 22:32:21 +00:00