Commit Graph

4678 Commits

Author SHA1 Message Date
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