Commit Graph

4787 Commits

Author SHA1 Message Date
Anthony Lee 355e9dffc3 Merge "b/17193866. Update policies when we reconcile." into ub-gmail-ur14-dev 2014-08-22 17:15:44 +00:00
Anthony Lee ce1faa889d b/17193866. Update policies when we reconcile.
In the situation where we have deleted an Account from our
provider reconciliation will delete the associated amAccount.
Unfortunately, there isn't any sort of side effect code path
that considers that policies may need to be updated when
this Account is deleted. This CL injects that logic.

Change-Id: I27c7a35efbdca4be274a9d3d8f7ce698f9204092
2014-08-22 10:03:44 -07:00
Tony Mantler c1a760bf36 Match dup accounts against all accounts, not just Email
Also deanonymize loader inner classes
and fix a bug on re-reading a cursor after rotation.

b/16326913
b/15547554

Change-Id: I6e9dd36f425c1df93823a4b9d1faba15a802ad50
2014-08-21 22:12:26 +00:00
Tony Mantler 1e6f26af80 Merge "Drawer resource updates" into ub-gmail-ur14-dev 2014-08-16 04:03:42 +00:00
Tony Mantler ebae672af4 Drawer resource updates
b/17071718

Change-Id: I4a3a93b23c68f63d306fedf39ebbae09ee5ee094
2014-08-19 14:20:12 -07:00
Rohan Shah 523d3073f6 Update Notifications (Email)
Got rid of large icon and only setting 'small icon' now.
If conceal sensitive info has been enabled, also hides
the ending of the account address.

Bug: 16987147
Change-Id: I0899a602d1dfdaef980002746ce9079912f0525c
2014-08-19 17:54:45 +00:00
Paul Westbrook 1371dd990f Change method signature
Bug: 16153528
Change-Id: I7f183bab825176814275f6c99981554e4529983a
2014-08-19 03:28:43 -07:00
Tony Mantler f4b55c8edb Merge "Fix folder sync settings for tablet" into ub-gmail-ur14-dev 2014-08-16 03:56:00 +00:00
Tony Mantler ac4b0efd9f Fix folder sync settings for tablet
b/17068128

Change-Id: Ia61cba10fb0edc97448d9ff39aa58578db1d4ac7
2014-08-15 16:24:38 -07:00
Rohan Shah a8a185f75c Merge "Update Notifications Icon (Email)" into ub-gmail-ur14-dev 2014-08-15 18:45:09 +00:00
Rohan Shah b5e710f447 Update Notifications Icon (Email)
Rest in pieces little gmail icon :(

Change-Id: I14459cba33cf61f6717d922bdb006d8d56ad893c
2014-08-15 17:54:08 -07:00
Tony Mantler 486e971066 Fix providers.xml alternate diversion
b/17048013

Change-Id: If2bc857266a6ba1445bf1fabbaed179c1b13a14f
2014-08-15 11:54:56 -07:00
Rohan Shah 7941b406cf Update Notifications (Email)
Switched out icons (For updated mail notify icon).

Bug: 16987147
Change-Id: I695b4c51daddc47eecbe7d856de642932190c4bb
2014-08-13 17:24:52 -07:00
Tony Mantler 9f14d6b0de Extend MailboxSettings to handle full folder list
b/16541463

Change-Id: If428413ad258497a5654fa095d51cd60f6ed4e18
2014-08-13 14:18:01 -07:00
James Lemieux 66ff95a561 Merge "End of Life screen for Email" into ub-gmail-ur14-dev 2014-08-12 23:14:33 +00:00
James Lemieux 50591a7be4 End of Life screen for Email
b/16843301

This introduces a new build target: EmailGoogleTombstone.
Building with a tapas line that includes that target will
produce EmailGoogleTombstone.apk. The apk includes the
EmailProvider and AttachmentProvider (for migration to
Gmail) and an activity that explains to the user where to
find their email data.

Change-Id: Ib8192b46d9017e04f5c99f5c8e509531198eec07
2014-08-14 11:31:33 -07:00
Tony Mantler 4c86584685 Don't return a protocol for a null account type
b/16735532

Change-Id: Ie83709fe3a9942ef946cf86f853b3d6565dc5799
2014-08-07 15:36:20 -07:00
Tony Mantler f1789afa53 Switch null checks to TextUtils.isEmpty()
b/16872654

Change-Id: Ib8943f068ad6988ff08f8bfd54e2df8fa5ce0274
2014-08-07 14:11:02 -07:00
Anthony Lee 8218d00634 Merge "Make sure that we close the cursor." into ub-gmail-ur14-dev 2014-08-07 15:00:45 +00:00
Anthony Lee 4524dccde8 Make sure that we close the cursor.
Found this problem while testing Email migration.

Change-Id: I07862b5c4dd2ef189a87f7dbd085030c448f365f
2014-08-07 13:13:21 -07:00
Tony Mantler 1381d4083b Skip null/empty account types
b/16730607

Change-Id: I6b3207edbf3dc841dd2222e92f69d270a0caf773
2014-08-07 12:58:18 -07:00
Régis Décamps f9d845c1b7 Fix `getAllAmAccounts()` returning duplicated accounts
Use a set to save the account types, in order to de-duplicate identical
types.

Also, remove unused imports.

Bug: 16811863 Duplicate POP accounts are listed
Change-Id: If699d03b2c12959cfde9926bec9352b71c3d8912
2014-08-06 20:27:39 +02:00
Jin Cao 99e882e22d Support the new MOVE_FAILED_TO_DRAFT operation in Email
Default the MOVE_FAILED_TO_DRAFT action to simply deleting
the failed message from Outbox for Email since this is the
current behavior.

b/4080109

Change-Id: I74917d0b2581e2dd145906dddfac395efc2d8206
2014-08-01 17:15:44 -07:00
Andrew Sapperstein 0a17fcfae5 temp fix for b/16730607
Change-Id: I1474955d82442ad10527e2a308fa19bec7b144e9
2014-08-01 11:41:50 -07:00
Tony Mantler 751da26172 Add Exchange fallback and support diverting to Gmail
b/16679701

Change-Id: I59d7cb4a803f0ad8e782614d0c6cc635318d2375
(cherry picked from commit d039322f74)
2014-07-31 21:44:26 +00:00
Tony Mantler 16176e5bb7 Imap folders are case sensitive
For real this time

b/16686642

Change-Id: Ib484c2ac3505ff35bc643bbc51597f1ceb4e7f7e
(cherry picked from commit 60e5abbc56)
2014-07-31 21:43:22 +00:00
Tony Mantler e96791403e Add support for disabling OAuth on setup flow only
b/16633826

Change-Id: Iea984ae656fbf3fe44de7598fdb9357a18d52a74
2014-07-30 09:55:16 -07:00
Tony Mantler 751a029c31 Convert server settings to dialog
b/8134410

Change-Id: I3c4c9a02a37571a9c7af10971840fbe39458244e
2014-07-29 15:12:04 -07:00
Anthony Lee ebe49cfeaf b/16570506. Only enable alternate EAS authenticator when needed.
The old code was turning on both the EAS authenticator and the
alternate EAS authenticator (with the offending string). Now it
turns on the right one depending on the VendorPolicyLoader.

Change-Id: I69945e695f28fdb8bd33bf49ee253a354c05b30c
2014-07-28 14:37:02 -07:00
Martin Hibdon aaa26e8c3f Merge "Disable Eas Authenticator if Exchange is not installed" into ub-mail-master 2014-07-24 22:43:15 +00:00
Martin Hibdon 74dc106ae9 Disable Eas Authenticator if Exchange is not installed
b/16541219

Change-Id: Ibc2a9608278762e6af4f7c429b08ad38935bfcae
2014-07-24 15:46:15 -07:00
Anthony Lee 20110e6288 Factor out the guts of setupAccountManagerAccount()
The new function will be called by the old function but it also allows
me to use it from the Migration code.

Change-Id: If9b2ad82479d60c63e8924d42fb6ce18d7d9a2f8
2014-07-24 13:28:26 -07:00
Tony Mantler 14a64cef86 IMAP mailboxes are case-sensitive
b/15694346

Change-Id: I4a59979f40d6118bb9c7e27069ea228ba783a4c3
2014-07-21 10:24:32 -07:00
Tony Mantler cd118b3b61 Add support for launching setup flow via intent action
b/16371282

Change-Id: I9ee45d769a6f73fe1e44b7ca7607f8f0b54a703d
2014-07-18 15:35:35 -07:00
Ray Chen 045aa05777 Add ACCOUNT_ID to ACCOUNT_COLUMNS and populate it with Email from
EmailProvider.

b/16400882

Change-Id: I2765fa6cea392e07b878fe063c7234582a485b1d
2014-07-22 11:31:37 +02:00
Ray Chen 7e75afadb1 com.android.mail.providers.Account contructors are no longer public
and clients need to use Account.builder().buildFrom(...) instead.

Change-Id: I7559540458ae549c399effc59392930ec914ffcc
2014-07-16 10:06:23 +02:00
Tony Mantler 845001d250 Merge "Add "Add Account" to prefs headers" into ub-mail-master 2014-07-15 16:04:58 +00:00
James Lemieux 2a70971689 Merge "Marking conversations read/unread in the TL removes the snippet text" into ub-mail-master 2014-07-15 16:06:25 +00:00
James Lemieux b4a9c1e302 Marking conversations read/unread in the TL removes the snippet text
b/16322573

EmailConversationCursor was not populating the firstUnreadSnippet and
lastSnippet values in ConversationInfo. When they remain null and are
subsequently set as the snippet text, it effectively removes the snippet.

Change-Id: I1c17508bbc8857d00d8678dca4a7ad791dcae049
2014-07-15 12:39:21 -07:00
Tony Mantler 9ccae204cf Merge "Make quick response UI in settings toggleable" into ub-mail-master 2014-07-15 16:04:58 +00:00
Tony Mantler e9e2a21d87 Make quick response UI in settings toggleable
b/16302932

Change-Id: I24b289ffbecd4f127e6109b56c0af7f9c4b00879
2014-07-15 10:31:18 -07:00
Tony Mantler 46c95eb6c9 Add new account intent is no longer forwarding
It now launches directly instead of bouncing through settings

b/16309940

Change-Id: I23ab9902f3b02e466626e08b842a5228193a7909
2014-07-15 09:56:55 -07:00
Tony Mantler 1dcdc09e03 Add "Add Account" to prefs headers
Borrowed + icon from authentication widget

b/16298155

Change-Id: I36d0eb2c7b9e98442d72481254d9a4da2ae3c999
2014-07-14 14:33:32 -07:00
Jay Shrauner 5c93d36616 Merge "Fix NPE in uiSaveDraftMessage" into ub-mail-master 2014-07-14 18:38:02 +00:00
Tony Mantler 8f5ca5a790 Rename AccountSettings to EmailPreferenceActivity
Change-Id: I972cdae394081b5ec028c38b9274e64ef5822d4a
2014-07-14 11:44:52 -07:00
Jay Shrauner bcc204dd6f Fix NPE in uiSaveDraftMessage
Verify that restoreMessageWithId returns a non-null result.

Bug:14655866
Change-Id: Ia48d5fd96a4314f4e10e9a8c3764ad52f2aa5eed
2014-07-14 10:51:00 -07:00
Martin Hibdon bb391e8018 Merge "Update IEmailService" into ub-mail-master 2014-07-14 17:08:38 +00:00
Tony Mantler 6cf6b5c292 Merge "Remove direct entry points to AccountSettings" into ub-mail-master 2014-07-14 16:02:26 +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
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